/orchestrate:takeoverfrom orchestrate
Claim a programme's owner lock, re-verify every lane handle, run one tick and report what to arm next. Use to pick up a programme after a handover, to resume one whose orchestrator crashed or ran out of credits, or to take a stale lock. One line is enough to start with no other context.
Ships in orchestrate. 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.
None: SKILL.md is the whole skill.
${CLAUDE_PLUGIN_ROOT}/scripts/orchestrate.sh takeover <programme>
# the lock is held and fresh, and you are certain the holder is gone
${CLAUDE_PLUGIN_ROOT}/scripts/orchestrate.sh takeover <programme> --takeover
Taking a programme mints a token and prints it once, with the export line:
export ORCHESTRATE_SESSION=<token>
Export it immediately. It is stored NOWHERE: owner.json holds only its hash.
Every verb that writes (send, merge, post, mark, pr, retire, tick,
loop) refuses without it and names this verb as the way in. A harness that
cannot set an environment variable passes --session <token> instead.
That is what makes the lock per ORCHESTRATOR rather than per directory. An identity kept in the programme directory would be readable by any process that opens it, and two orchestrators on one host would silently share one lock and double-merge, which is the thing the lock exists to stop.
| situation | what to do |
|---|---|
| you lost the token | the programme stays locked until the lock goes stale, then takeover again. There is no recovery path that reads it back, by design |
| you are arming a loop | the driver passes the token to the ticks it spawns. Keep it exported in the session that armed the loop |
| the harness has no environment | pass --session <token> on every call |
| someone handed the programme over | the old token is spent; claim a new one here |
A same-user process that steals the token is inside the documented trust
boundary (${CLAUDE_PLUGIN_ROOT}/references/never-do.md). One that merely runs
the script in the same directory is not an owner.
This is the whole start-up sequence for a fresh session on any harness. Nothing else needs to be in context.
owner.json and mints the token above. A lock held by another session
is refused unless it is stale past twice the cadence, or --takeover is
passed. Either way the takeover is recorded with both labels and the reason.
Taking a programme you already hold is a no-op, not a fight.HANDOVER.md in the programme dir if there is one, then
ORCHESTRATION.md, which is the house rules and outranks your instincts.orchestrate:tick./loop on Claude Code, orchestrate:loop --tmux anywhere
else.The refusal names the session holding the lock and how long ago it ticked. That
session is probably alive. Do not pass --takeover to get past a refusal you
have not understood: two orchestrators on one programme double-merge and
double-message. Check with the holder, or wait for the lock to go stale.
The programme dir is host-local. To take over from another machine, copy
~/.claude/orchestrator/<programme>/ there first, then re-verify handles, which
this verb does anyway. Say in your first report that you moved it.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
10 skills in this plugin
/adoptIndex the agent lanes that already exist into a programme's lanes.jsonl, reading each terminal to classify it and its context use. Use when taking charge of lanes started by hand, when starting a programme from running work, or as the re-verify pass after a host restart or before any send. Dry-run first, confirm once, then write./discoverList the Orca environments, hosts, worktrees and terminals a programme could use, and say which environments are unreachable. Use before adopting or spawning lanes, when a host may have restarted, when "what is running where" is unclear, or when a remote environment looks down. Asks Orca only, never ssh./handoverGenerate HANDOVER.md from a programme's index files and release the owner lock so another session, on any harness, can pick the programme up. Use when credits or context are running out, when asked to stop, when a session is ending, or before switching the orchestrator to a different agent or machine./loopArm the repeating tick engine for whichever harness is running, with a cadence, stop conditions and a STOP file. Use after a tick to keep a programme moving unattended, when a loop has stalled and needs re-arming, or to stop one. Claude Code arms its native loop; Codex, agy and anything else use the bundled tmux driver./preflightReport host capacity for a programme: disk free per host, how many lanes each carries, and which metrics rung answered. Use before placing a new lane or when a host looks full. The full metrics ladder, scoring and placement refusals are cut 2; this ships the probe rung and the recorded floors only./retireRemove a finished lane's worktree through Orca, only once it is merged, clean and idle. Use when a lane's work has landed and its worktree is just taking disk, or at a programme's exit condition. Refuses on anything still working, still holding an open PR, or still showing a live agent.npx claudepluginhub stevengonsalvez/ainb-toolkit --plugin orchestrate