theater-recover-tmux
Recover Theater participants after a tmux server restart or kill-server using retained participant metadata, native session resume, and an explicitly chosen conservative recovery mode.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- theater-recover-tmux
- description
- Recover Theater participants after a tmux server restart or kill-server using retained participant metadata, native session resume, and an explicitly chosen conservative recovery mode.
03 SKILL.md 正文
Theater Recover tmux
Use this skill to diagnose or recover Theater participants after a tmux server restart or
kill-server. This is a workflow over existing Theater tools, not tmux cleanup or native mutation.
Find the incident
Begin with list_participants(include_dead=True, limit=100). If a page is full, continue with the
last row's stable id as after_id; repeat with the same limit until all retained rows have been
examined. Do not use names: dead names are absent and recyclable.
Ignore rows missing either required reset field—termination_reason or termination_incident—or
terminated_at. Keep only rows with termination_reason="tmux_restart", then group them by
termination_incident. Use the incident the user names; otherwise choose the group whose maximum
terminated_at is newest. If no complete group exists, say that Theater has no retained tmux-restart
candidates and stop.
Show a concise recovery plan before spawning. For every candidate, include its stable id, harness, cwd, branch, session_id, resume_state, and the incident id and time. State which rows are expected to resume, which need workspace-only review, and which will be skipped.
Choose recovery and approval
If the user did not specify a recovery mode, ask exactly once with the host harness's native structured ask-user tool:
- Best effort (recommended)
- Review plan first
- Manual per participant
If the host has no native structured ask-user tool, ask the same question in the normal response and stop until the user answers. Do not infer a mode from silence.
Obtain one explicit approval choice—manual, edits, or yolo—before any spawn. Reuse a choice
the user already gave; otherwise ask once. Theater has no approval default: never invent one.
In review-plan-first mode, make no spawn until the user approves the shown plan. In manual-per- participant mode, confirm each candidate before acting on it. Best effort proceeds only within the limits below.
Recover conservatively
Best effort never deletes, resets, overwrites, kills, invokes GC, or alters worktrees or branches. It neither recreates nor cleans up anything. It only attempts the retained participant context where the current state permits it.
Before each attempted recovery, re-list that stable id with
list_participants(include_dead=True, ids=[id]). Skip it if it is now live, owned by a live
participant, missing, or its resume_state is no longer resumable; report the observed state.
For a resumable row, call spawn_session with:
resumeset to the stable predecessor participant id;- the retained
cwd; worktree=False;- the same
harnessand the chosenapproval.
Resume reuses the predecessor's workspace: never combine it with worktree. Pass the retained
cwd; a THEATER-owned (named or unique) worktree is rejoined even while other participants share
it. A path owned by any other non-borrowed workspace is refused with path_already_owned.
Do not invent a model or reasoning effort. Pass model or reasoning_effort only when the row
actually records that native value; otherwise omit the parameter. Do not change the retained branch
or request a new worktree.
For every non-resumable row, explain its resume_state rather than claiming conversational recovery:
live (still running), no_session_id (Theater has not recorded the harness session id),
harness_cannot_resume (the adapter does not support resume), untrusted (transcript provenance
is below operator-level), owned_by_live (a live participant holds the trusted session or claims
this predecessor as a recovery successor), harness_resume_rejected (the harness preflight refused
the session).
Workspace-only recovery can spawn a replacement auditor only when it is safe and the selected
recovery mode or user confirmation explicitly permits the fallback. Use the same retained harness and
cwd with worktree=False unless the user explicitly chooses otherwise. Approval is execution policy,
not authorization for the fallback. Describe it as workspace review, not a resumed conversation; apply
the same duplicate check first.
Verify every spawn using its returned record and, when needed, list_participants. Summarize each
candidate as recovered, skipped, or failed, with its stable predecessor id and the reason. Do not
perform cleanup after the summary.
04 同仓库更多 Skills
theater-delegate
Hand a scoped task to a suitable existing Theater peer, or start a builder and independent reviewer pair when the work needs one. Stay or run in the background as the user requested.
theater-debate
Debate a review, design, or architecture decision with one specified Theater participant when the user asks to debate with a harness, model, and reasoning effort. Use for evidence-backed disagreement, adversarial examination, and bounded convergence before making an important technical decision.
theater-configure
Configure or personalize Theater interactively when the user wants to set up, review, or change their Theater settings — favourite CLI, régie theme and behaviour, which models and thinking levels agents may use, plugin enablement, safety limits, retention, and observability. Use for a guided question-by-question walkthrough of config.toml that discovers what it can from the machine and asks the rest in plain language, including first-time setup on a new machine.
reviewer
Master of a pair play. Spawn one builder, review its work read-only, debate with evidence until you both agree, verify, and report. Attach this card when spawning a reviewer; never load it in your own chat.
builder
Builder in a pair play. Implement the brief in the shared worktree, defend your choices with evidence, and iterate with the reviewer until you both agree.
worker
Task role for a lead or member in a hierarchy play. Implement the assigned change inside the paths you own and report what you verified.