Skip to content
Skills Library
AI & agents · Automation

thrum-sleep

/thrum-sleep

Park this agent for operator-initiated wake. Saves a standard 11-section snapshot (does NOT signal coordinator) then thrum-tmux-kills own session. Use when the operator is shutting down (e.g. computer restart) and the agent should resume from snapshot on next boot. # source: claude-plugin/commands/sleep.md # generated-by: scripts/sync-skills.sh

Repository
thrum ↗
Licence
MIT
Last repository change
23.06.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 23.06.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Park this agent for operator-initiated wake. Saves a standard 11-section snapshot (does NOT signal coordinator) then thrum-tmux-kills own session. Use when the operator is shutting down (e.g. computer restart) and the agent should resume from snapshot on next boot. # source: claude-plugin/commands/sleep.md # generated-by: scripts/sync-skills.sh

Original author description

Park this agent for operator-initiated wake. Saves a standard 11-section snapshot (does NOT signal coordinator) then thrum-tmux-kills own session. Use when the operator is shutting down (e.g. computer restart) and the agent should resume from snapshot on next boot. # source: claude-plugin/commands/sleep.md # generated-by: scripts/sync-skills.sh

How it works

  1. Sleep — Park Until Operator Wake
Original SKILL.md headings · 133 lines, 777 words
SKILL.md preview
---
name: thrum-sleep
description:
  Park this agent for operator-initiated wake. Saves a standard 11-section
  snapshot (does NOT signal coordinator) then thrum-tmux-kills own session. Use
  when the operator is shutting down (e.g. computer restart) and the agent
  should resume from snapshot on next boot.
# source: claude-plugin/commands/sleep.md
# generated-by: scripts/sync-skills.sh
---

# Thrum Sleep

Use this skill when the user explicitly wants the `sleep` Thrum workflow. Prefer
the umbrella `thrum` skill when the request spans multiple commands or needs
broader coordination judgment.

## Sleep — Park Until Operator Wake

Compose a standard 11-section prose continuation, write it directly to your
restart file, then end session cleanly and kill own tmux session. The agent goes
to sleep until the operator wakes it later via
`thrum tmux create <session-name>`. Unlike `$thrum-restart`, sleep does NOT
signal the coordinator and does NOT wait for an external mover — it terminates
its own tmux session.

### When to Use

- The operator is shutting down the machine (e.g. computer restart) and wants
  this agent's work durably parked.
- The operator wants to free a tmux session slot but resume this agent's work
  later.
- You (the agent) decide independently that further progress requires the
  operator's attention later, not the coordinator's now.

For routine context-exhaustion / rate-limit restarts where the coordinator
should bring you back in-place, use `$thrum-restart` instead.

### Steps

#### 1. Resolve identity + verify tmux session (Tier 1 pre-check; run BEFORE anything else)

```bash
# Resolve identity + your worktree (needed before reading the partial).
# $REPO must be YOUR worktree — the directory `thrum prime` reads the restart
# snapshot back from. Resolve it from the daemon's authoritative identity, NOT
# `git rev-parse` (which keys off the current shell CWD and would write to the
# wrong .thrum/restart/ if a bash step left your worktree). Fall back to git
# only if whoami can't answer.
REPO=$(thrum whoami --field worktree 2>/dev/null)
[ -n "$REPO" ] || REPO=$(git rev-parse --show-toplevel) || { echo "ERROR: cannot resolve your worktree"; exit 1; }
AGENT=$(thrum whoami --field agent_id) || { echo "ERROR: agent not registered"; exit 1; }
[ -n "$AGENT" ] || { echo "ERROR: empty agent_id"; exit 1; }
mkdir -p "${REPO}/.thrum/restart"

# Tier 1 pre-check: tmux session must exist BEFORE writing snapshot:
SESSION=$(thrum whoami --field tmux_session)
if [ -z "$SESSION" ]; then
  echo "ERROR: the sleep command requires a tmux-managed agent session (tmux_session field is empty)."
  echo "Use the restart command for non-tmux sessions."
  exit 1
fi
```

If `tmux_session` is empty: ABORT before writing any snapshot. No status change,
no session end. Exit code 1. The skill is the wrong tool for non-tmux agents.

#### 2. Read the shared snapshot-composition partial

Read the partial at the absolute path:

```text
${REPO}/claude-plugin/commands/_snapshot-protocol.md
```

Apply its Step 2 (compose your continuation) per the structure guidance.

**Use the STANDARD 11-section structure.** For comprehensive
designer/architect-grade snapshots, use `$thrum-sleep-extended` instead.

**Note on §1 framing:** For sleep snapshots, the Big Picture section frames as
"where work stands at park time" rather than "what shipped" — the agent is
parking, not completing. Composition discipline (1–3 sentences, specific,
load-bearing-first) is identical to restart.

#### 3. Write the continuation

Per Step 3 of the partial, use the Write tool to save your composed continuation
to `${REPO}/.thrum/restart/${AGENT}.md`. On next boot, `thrum prime`
auto-injects this file — same mechanism as restart wake.

#### 4. Mark agent operational status idle

```bash
thrum agent set-status idle
# NOTE: idle-status write becomes observable after thrum-9neg lands.
```

Per thrum-9neg agent-status-wiring verdict, `idle` is the signal that this agent
has parked. NO new "sleeping" state was added — `idle` covers both "no active
work" and "parked for operator wake."

If `thrum agent set-status` returns an error (e.g. rate-limited), continue to
Step 5 — the snapshot on disk is the load-bearing artifact, not the status
field. The operator can set status post-wake.

#### 5. End session cleanly

```bash
thrum session end
```

This emits an `agent.session.end` event cleanly so the dead-agent sweeper does
NOT later treat the disconnect as a crash. If `thrum session end` fails,
continue to Step 6.

#### 6. Kill own tmux session

```bash
thrum tmux kill "$SESSION"
```

Tmux pane terminates → runtime process exits → no further activity until
operator wakes the agent via `thrum tmux create <session-name>`.

### How wake works

The operator brings you back later by running `thrum tmux create <session-name>`
(or analogous). On runtime start, `thrum prime` auto-injects the snapshot at
`.thrum/restart/<your-agent-id>.md` — same mechanism used by restart. Resume
from §9 (Numbered resume plan).

The snapshot file moves to `.thrum/agents/<your-agent-id>/sessions/` archive on
wake (same as restart). Worst-case fallback: previous Claude session may be
resumable via Claude Code's native session-continuation mechanism.

### Programmatic use (operator shutdown scripts)

The underlying mechanic — write snapshot + set status idle + session end + tmux
kill — can be invoked from an operator's shutdown script directly via the bash
commands above (without going through the skill). Out of scope for thrum-rwhg;
document only.
Files in this package (2)
  • SKILL.md 5 KB
  • agents/openai.yaml 1 KB

Versions

The database has no other skills named thrum-sleep.

Database snapshot: 13.11.2026 · package version f593548b12e2 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 95thrum-sleep-extended
    Park this agent for operator-initiated wake with a comprehensive 16-section snapshot (does NOT signal coordinator) then thrum-tmux-kills own session. Use for designer/architect-grade work where wake may be cold and must recover wire contracts + capability matrix + design…
  • 100thrum-restart
    Save a conversation snapshot and prepare for session restart. Use when you need a fresh session due to context exhaustion, rate limits, or stuck state. # source: claude-plugin/commands/restart.md # generated-by: scripts/sync-skills.sh
  • 100cq-stop
    Put this session's cq queue watcher to sleep - save a handoff, set the sleep flag, stop the watcher, and clear the conversation so an idle session costs nothing. Use when the user says stop cq, sleep, pause this session's queue, or when the watcher prints CQ-SLEEP. A coordinator…
  • 100agent-sleep
    Sleep-cycle memory management for coding agents. Use when consolidating a finished session into memory, running daily memory hygiene or drift checks, prestudying a repo before the next session, reconciling accumulated memory, rebuilding memory from source, or installing the…
  • 100sleep
    Use Sleep's reviewable T0 to T1 to T2 memory cycle in Pi or OmO. Use when the user asks to capture a durable observation, run sleep or dream, inspect provisional memory, measure replay, or promote an approved candidate.
  • 80after-restart
    After a PC restart, crash or Claude app freeze, find the cause and resume the sessions that were mid-task. Use when told "system restarted", "Claude crashed", "resume all sessions" or similar.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.