/session-orchestration:orchestrating-sessionsfrom session-orchestration
The coordinator's playbook - start, resume and message a project's sessions, read their status, relay the user's approvals. Use when acting as the coordinator (first prompt "Act as a coordinator", or first line `Coordinate KEY: …`) or asked to coordinate sessions. Not for a session that reports to a coordinator: its reply card covers that.
Ships in session-orchestration. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Receiving a message, not coordinating? Read worker.md next to this file instead; the rest is the coordinator's.
First line Coordinate KEY: …? You are KEY's sub-coordinator: read subcoordinator.md first
and skip Start below.
You coordinate the user's parallel sessions: you route work, relay the user's decisions and keep the state in files;
the sessions do the tasks. Every wake (a message, an idle notice, a watcher) re-sends your whole context, so keep it
small: the state lives in the status command, the tracker and the handoff file. The status command is the project's
own if its CLAUDE.md (in your context already) names one, else session-status next to this file by its full path,
with no cd (a hook refuses cd; use absolute paths or git -C); never a guessed path or an a || b fallback chain (named only in the project's
coordinator doc: read that first). The project's
CLAUDE.md section names the files (the "Replies folder", "Project memory" and handoff-file lines). The other files
here are read when their event comes up: the index at the end.
Every coordinator session, before anything else; the user shouldn't have to ask.
mcp__session-orchestration__open_pane (that schema only: load any other tool's when you
first call it) and a Read of the project's coordinator doc if its CLAUDE.md names one. At your first prompt a
hook (hooks/start-inject.sh) has already put --start's output, the memory index and its coordinator topic file
in your context ("Start context, part N of M"); its last part may name a file holding the rest: Read it in this
batch; it says --start is still running: add the wait it names. No Start context: add the status command with
--start as Bash run_in_background: true (which command: above), and a Read each of the memory files. Read files with
Read, not a cat bundle: the Bash tool truncates long output.open_pane. If it says the folder isn't set up, follow the setting-up-coordination skill (it ends with
open_pane again), then run --start again.--start's output (the Start context, else its completion notice; don't poll it), do what each section and
feature line names, plus whatever the project's coordinator doc adds. Its status and approvals are bounded (the
plain status command and --approvals list them all). Then prune the handoff file against the status (Handoff
file), recheck each ask open_pane listed as OLD (approvals.md, Asking), and read a reply whole
only when its header line or its last section needs you, or the two disagree (then the later of the two, by
dates and the Done: line, is the state).You succeed "NAME") then does the successor's step (handover.md).Waking a session makes it re-read its whole context, often hundreds of thousands of tokens.
session-status --stale lists them alone.— apply?, — start it?) goes to the
user, and its step runs only on their yes. A messages module's Notices line: act on it per that module's doc
(its feature line names it); one the user calls handled: session-status --dismiss "LINE", which hides it for
every session; don't pass it on again.session-status --peek ID shows its
last turns, --activity what each live one is doing, without waking anyone.claude -p --resume an old session just to ask for status.session-status --kind scan), which reports one line: belongs to task
X / needs a reply / nothing. Read it yourself only when the answer is one short field.session-status --config approvals.delegate prints true).— blocked: line under Waiting on you): at once queue one ask,
"Allow it on its card (Allow this call)" when its card offers that button, else open its attach tab
(session-status --open view) and ask "Approve it in the tab"; either way "Stop it and resume with a workaround"
is the other option (resuming.md). Not a chat line alone.Idle: NAME (ID8): its last line); it may be a wait on an approval, not the
finish: check its status. Set notify_when_idle: true only for a session the watcher doesn't cover: an interactive
one, or one outside the project folder. Never poll ListAgents, and never send "are you done?".[Cross-session delivery notice] tells you when that happened. The watcher's
Idle: line (or a notify_when_idle notice) but no reply: ask the user to check that session. Don't read silence as progress.The project names a handoff file (e.g. pending.md), shown by --start and the pane. It holds only what would
otherwise live in your conversation alone, so the next coordinator can pick it up:
- line each: decisions waiting on the user off the pane, instructions you
drafted but haven't sent, and open requests to sessions. Nothing the status or the pane holds: no ask queued on
the pane restated (the pane keeps it across handovers), no copied status or quoted approvals. Name the session's id
when there is one. A landing waiting on its relay names the key, the session and the PR, never a ready relay command
or block: the successor runs session-status --relay itself. Write "on you", "the user" or "your call" in an
entry that waits on the user: that puts it at the top of the pane.>>) doesn't show.pending.file set, run session-status --pending-done LABEL -- REASON (memory-rules.md). At
Start, check each entry against the status and the replies. A decision still waiting on the user stays.Handing over (at the context-watch hook's mark, at Weekly limit:, or a restart), and the successor's step:
read handover.md then, and do what each step prints.
The coordinator inbox (<replies>/coordinator-inbox.md) holds the replies no live coordinator took; --start
and --watch show them with what to do. Another project's coordinator, under any account, is told something with
session-status --inbox-add --root <its root> (features/accounts.md, Messaging another
project's coordinator).
Friction is feedback, not memory (feedback.md). Before you append, prune, or file a lesson the user gives you: memory-rules.md, Project memory.
Arm the status command with --watch (session-status --watch [args], or the project's own), as Bash
run_in_background: true with a long timeout (e.g. 7200000). It wakes you only on a change that lasted two
polls, a failure that lasted three, an Idle: line (checked every minute from the session files, no tracker call)
or the timeout: it retries Jira/Bitbucket/jq blips and ignores working↔idle
flips itself, so never wrap it in a loop or filter. Report what changed, then re-arm it. One watcher at a time: skip
arming if one already runs. Never /loop the status command: every tick re-sends your whole context, and most ticks
find nothing. Workers' reports that need nothing from you now are held for it (hold) and arrive together in
one wake, under Held reports, already marked read: act on each as on a message. A PR events section in its output: sessions.md, PR events. It also starts the
scheduled starts that are due (session-status --launch … --at, sessions.md, Starting a session) and wakes you with
each result (Scheduled start (due …): …). A background session stopped by the 5-hour limit is resumed a minute
after the reset, with no wake (status-reference.md, --watch). Messages you send it during the wait aren't lost:
the resume acts on them.
The watcher stops a finished task's session at rest (one whose last turn only reads as asking too) and removes its
worktree when nothing can be lost (its commits landed, or all on its own remote branch), and a Resolved worktree on no
task, with no ask (the --changes row in status-reference.md); each section of a change that wakes you (Stopped, Logins restored, …) names what to do. A leftover session or worktree it leaves (its Leftovers line says why) stays the
user's call: ask before removing it.
--init --write, a note in a review's header) and an untracked person file at the project root
(CLAUDE.local.md, .claude/coordination.local.json) when the user asks you for that edit directly, or a pane
yes or approved proposal names that file and the change: no session can make it (a worktree hasn't the file, and
a claude --bg session's isolation guard refuses an edit in the main checkout). .claude/coordination.local.json
and the person-wide config need more than that: coordinator-guard asks the user for every write of them in an
attended session and refuses it in a background one, pane yes or not. Everything else goes to a
session, however small: a one-line CLAUDE.md edit, a settings or hook fix the user asks you for directly.hand_command (key: the task's, or
coordinator) with one line on what it does, plus the ! <command> line in chat; a handoff-file line or chat
alone doesn't show on the pane. Not a step that needs the user's approval (ask_approval, approvals.md, Asking), nor
one the pane has as an action button.claude --bg, never as a sidebar session (start_session):
the status, the watcher and --stop see only claude --bg sessions. The one sidebar session you start is your
successor (handover.md); a hook refuses any other. No claude on PATH: hand the user its install
(README). Config start.sidebar, the user's exception: sessions.md, Starting a session.Done: line names. Neither shows
it: ask the session, and report the task as not done yet.--handover --self; its
row shows superseded by) without a message: don't tell the user. Mention one only when it failed, repeats without
progress (a handoff ready message: plans.md), or changes what waits on the user.gh alone, or piped only into jq, grep, head, tail, wc, cut, tr, uniq or cat. The approval hook refuses a
pipe into sed, awk or xargs, since that could run gh's output: a permission prompt for the user when you are
attended, a denial otherwise.opened: yes it is open; on opened: no, or no opened:
line, open it yourself. Either way give the user its path.features.answers on, an answer to the user's question also goes to a file (not a status summary, not a
reply to a session): a new one in the folder --start's Answers line names, YYYY-MM-DD-<slug>.md (-2, -3…
before .md when that name is taken: never write over another answer), holding the question in one line, then the
answer, then Evidence: …, then Date: YYYY-MM-DD. An Explain prompt from the pane rewrites the file it names in
place.The files next to this one, each read whole when its event comes up, never at Start:
| Read | When |
|---|---|
| sessions.md | Listing sessions (which to coordinate) or reading a state: blocked; before you start a session (claude --bg), give one task work, name or confirm a task's owner, or act on work in a folder below the root; a message From the coordinator "NAME"; a PR events section; the same failure twice; after a plugin update; the user names a start mode |
| approvals.md | Before you put any decision to the user, queue or cancel an ask_approval, or relay an approval; a worker's needs your approval: line; an Approval pane answer for … prompt |
| resuming.md | Before you resume, wake or stop a session, or queue a message for later (--send-when-idle); a send that says "not reachable"; a session over 200K (exit 4), stuck on a permission prompt, or one claude stop can't confirm; "Workspace not trusted" |
| handover.md | The context-watch hook's hand-off mark; a Weekly limit: line; before a restart; your first prompt says You succeed "NAME" |
| plans.md | A task too big for one session; a handoff ready: KEY cN or handoff ready: KEY message |
| subcoordinator.md | Your first line is Coordinate KEY: … (sessions.md's Sub-coordinators covers starting one) |
| pane.md | A Coordinator pane action for …, Coordinator pane: the user ran the command … or Coordinator pane: the user wants to talk about the ask … or Coordinator pane: the user pressed Run on the command … prompt; the pane's Actions buttons; editing .claude/coordinator-actions.json |
| memory-rules.md | Appending to or pruning project memory; a lesson the user gives you; resolving a handoff entry with pending.file set; an entry's history; splitting or pruning memory; [team] lines; graduation; a retro's approved proposals |
| status-reference.md | A status line, footer or pane word that's unclear; an option this file doesn't name; writing or debugging an adapter; the context-watch settings |
| feedback.md | The plugin feedback: … footer; plugin feedback the user gives you; the moment you tell the user you worked around this plugin or the project, took an extra round trip, misreported because of a script's output or a file, or needed them to step in (feedback add, --project for the project's own friction) |
| A feature's doc | When its line in --start's output says |
approvals.jq (opens in a new tab)approvals.md (opens in a new tab)feedback (opens in a new tab)feedback.md (opens in a new tab)feedback.test.sh (opens in a new tab)handover.md (opens in a new tab)history-git (opens in a new tab)history-git.test.sh (opens in a new tab)memory-rules.md (opens in a new tab)pane.md (opens in a new tab)pending (opens in a new tab)pending-diff.jq (opens in a new tab)pending-versions.jq (opens in a new tab)pending.test.sh (opens in a new tab)plan.py (opens in a new tab)plans.md (opens in a new tab)reported-done.jq (opens in a new tab)resuming.md (opens in a new tab)review-inbox.md (opens in a new tab)review-inbox/inbox.html (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub hiverness/session-orchestration --plugin session-orchestration5 skills in this plugin
/choosing-model-effortSize work into a plan.models kind and get its model and effort. Use before starting or proposing a task session (claude --bg), before picking a subagent's model in a coordinated project, and in a retro comparing cost per kind./researchAnswer a question from outside sources (web, docs, other tools' code), judging what is reliable and applies here, changing nothing. Use for /research <question>, /research other-tools (scan other orchestration tools for ideas), a research-kind task, or when asked to compare libraries or find how another tool solves a problem./retroMeasure how efficiently sessions turn tokens into finished work (cost per merged PR, context size, waste, time to done) for one project or the plugin, check last run's proposals, rank the next changes. Use for /retro [project|plugin|both], a scheduled retro (retro-run), or when asked how the sessions perform./setting-up-coordinationSets a project up for coordinated sessions (one coordinator, parallel task sessions) - detects tracker, host and task keys, writes the adapter, CLAUDE.md section and config. Use for "coordinate this project", setting up or checking coordination, when open_pane says the folder isn't set up, or to change a coordination config value (tracker, host, key_pattern, terminal, approvals.*, start.*, features.*, retro.*, docs_watch.*, report_artifacts.*).