fo-dispatch-recovery
Claude dispatch failure recovery — Break-Glass Manual Dispatch (the manual `Agent()` template) and Context Budget Failure/Dead Ensign Handling (the…
Skill by spacedock-dev
Chalk Labs
Need help deploying fo-dispatch-recovery?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/spacedock-dev-fo-dispatch-recovery
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: finance, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/fo-dispatch-recovery
What's inside
- Skill name
fo-dispatch-recovery- Description
- Claude dispatch failure recovery — Break-Glass Manual Dispatch (the manual `Agent()` template) and Context Budget Failure/Dead Ensign Handling (the budget-unavailable stderr conditions, the recovery clause, dead-ensign bookkeeping). Read ONLY at its resident triggers inside `claude-fo-dispatch.md` — a non-zero or unavailable `spacedock dispatch build` (Break-Glass); or a budget-fail/zombie/dead-ensign replacement dispatch, including the dispatch-failure retry rung's fresh `-retry` re-dispatch under dead-ensign handling (Context Budget) — never at boot, never on the happy path.
- License
- Apache-2.0
- Instructions
- 51 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# First Officer Dispatch Recovery (Claude)
The two Claude dispatch exception bodies, each read only at its own failure trigger in `claude-fo-dispatch.md` — never at boot, never on a session where dispatch never fails.
## Break-Glass Manual Dispatch
The resident trigger line already covers the first action (report the helper failure — command, exit code, stderr — to the captain before proceeding). The dispatch mode selected before `dispatch build` remains authoritative: do not probe another transport, retry in the other mode, or turn a selected bare dispatch into a named worker. Populate `{numbered checklist}` with the output of `«dispatch.checklist»(entity, stage)`; do not rebuild its rules here. In either arm, include `model="{effective_model}"` only when an effective model is set.
For selected bare mode, use this blocking call. Omit `name`, `team_name`, and `run_in_background` entirely; Claude's observable tool stream may preserve that omission or normalize it to `run_in_background=false`, and both mean blocking bare dispatch. Never pass or accept `run_in_background=true`. Omit the completion-message block because the blocking return is the completion signal:
```
Agent(
subagent_type="spacedock:ensign", // override with the stage's agent: field when the workflow README names one
description="{entity title}: {stage}",
model="{effective_model}",
prompt="## First action\n\nBefore anything else, invoke your operating contract:\n\n Skill(skill=\"spacedock:ensign\")\n\nThis loads the shared ensign discipline (stage-report format, background-task polling, worktree ownership, completion signal protocol). Do not paraphrase; call the tool.\n\nYou are working on: {entity title}\n\nStage: {stage}\n\n### Stage definition:\n\n{copy stage subsection from README verbatim}\n\nRead the entity file at {entity_file_path}.\n\n### Completion checklist\n\n{numbered checklist}\n\n### Summary\n{brief description of what was accomplished}\n\n### Stage report\n\nAppend a Stage Report section at the end of the entity file (per the shared-core Stage Report Protocol). Use the title `Stage Report: {stage}`. Account for every checklist item above with a `- DONE:` / `- SKIPPED:` / `- FAILED:` entry. Use the checklist item text verbatim when possible."
)
```
For selected team mode, use this named background call. Omit `team_name`; retain the completion message to the single `team-lead` target:
Use the canonical semantic name from a successful dispatch envelope for this entity/stage. When build fails, use a retained validated envelope for that same assignment if available. Otherwise run `${SPACEDOCK_BIN:-spacedock} dispatch name --workflow-dir {workflow_dir} --entity-path {entity_file_path} --stage {stage}` once and use its stdout as `{canonical_name}`. This read-only query uses canonical naming validation without building or stamping; it works when the build route fails on the first dispatch. If the query fails or the executable is unavailable, report that dependency failure; never treat the hold as completed recovery. Do not retry the failed build to obtain a name. Do not derive a name from the old worker handle, duplicate shortening logic, or change dispatch mode. A replacement appends only its existing `-retry` or `-cycleN` suffix, at most eight characters; refuse over-budget or already-occupied final names before spawn.
```
Agent(
subagent_type="spacedock:ensign", // override with the stage's agent: field when the workflow README names one
description="{entity title}: {stage}",
name="{canonical_name}", // canonical base from the validated envelope or dispatch name for this entity/stage
run_in_background=true,
model="{effective_model}",
prompt="## First action\n\nBefore anything else, invoke your operating contract:\n\n Skill(skill=\"spacedock:ensign\")\n\nThis loads the shared ensign discipline (stage-report format, background-task polling, worktree ownership, completion signal protocol). Do not paraphrase; call the tool.\n\nYou are working on: {entity title}\n\nStage: {stage}\n\n### Stage definition:\n\n{copy stage subsection from README verbatim}\n\nRead the entity file at {entity_file_path}.\n\n### Completion checklist\n\n{numbered checklist}\n\n### Summary\n{brief description of what was accomplished}\n\n### Stage report\n\nAppend a Stage Report section at the end of the entity file (per the shared-core Stage Report Protocol). Use the title `Stage Report: {stage}`. Account for every checklist item above with a `- DONE:` / `- SKIPPED:` / `- FAILED:` entry. Use the checklist item text verbatim when possible.\n\n### Completion Signal\n\nSendMessage(to=\"team-lead\", message=\"Done: {entity title} completed {stage}. Report written to {entity_file_path}.\")"
)
```
This is the concrete Claude form of fo-dispatch-core.md's Break-Glass template; the contract (what it omits, the conditional `model=` slot, "use only when the helper is unavailable") is stated there. The canonical enum the conditional slot draws from is the resident `## Context Budget` section of `claude-fo-dispatch.md` (already loaded alongside this skill at the first dispatch).
## Context Budget Failure and Dead Ensign Handling
**Budget-unavailable is fail-safe (never silent-reuse).** The probe exits non-zero with no `reuse_ok` field in three conditions; the FO treats every one identically — fresh-dispatch:
- **missing jsonl** — no `agent-*.jsonl` exists for the named member (stderr: `no subagent jsonl found for '{name}'`).
- **unreadable/empty jsonl** — the jsonl exists but carries no assistant entry with non-zero `usage` (stderr: `no assistant entries with usage in {path}`).
- **agent-not-in-team-config** — no team `config.json` lists a member with that name (stderr: `no team config found for member '{name}'`).
A non-zero exit with no `reuse_ok: true` means the FO never silent-reuses on an absent reading.
**Recovery clause** (only when replacing a prior ensign): The prior ensign was shut down due to context budget limits. Its worktree may hold uncommitted changes. Run `git status` and `git diff` first; commit legitimate WIP or reset broken changes.
**Dead ensign handling:**
- `SendMessage(shutdown_request)` is cooperative — do NOT send to dead or unresponsive ensigns.
- Track dead ensigns in session memory; do not route work to dead names.
- Fresh-dispatch using the canonical name above plus a bounded `-cycleN` suffix when replacing a zombie ensign; preserve the old handle only for bookkeeping.
- The post-dispatch config check does NOT detect zombies — zombies pass it. Session memory is the authoritative dead-vs-alive tracker.From spacedock-dev/spacedock, Apache-2.0.
More from spacedock-dev/spacedock
- 0.676score
first-officer
spacedock-dev
Use when running or resuming a Spacedock workflow, especially to discover a workflow, dispatch packaged workers, manage approval gates, and advance entity…
SkillAFreshness: A★ 81Claude Code +9 - 0.671score
review
spacedock-dev
Get a person's review of an artifact you produced or were handed: a plan, spec, report or other Markdown file.
SkillAFreshness: A★ 81Claude Code +9 - 0.671score
compass
spacedock-dev
Open Spacedock Compass, the local dashboard of what your coding-agent sessions are doing: sessions, subagents, progress and drift.
SkillAFreshness: A★ 81Claude Code +9 - 0.659score
fo-gate-lifecycle
spacedock-dev
Handle an engaged gate entry.
SkillAFreshness: A★ 81Claude Code +9 - 0.642score
commission
spacedock-dev
This skill should be used when the user asks to "commission a workflow", "create a workflow", "design a workflow", "launch a workflow", or wants to…
SkillAFreshness: A★ 81Claude Code +9 - 0.636score
survey
spacedock-dev
Use when arriving at or returning to a project that already has AI-agent history and you want the lay of the land before doing anything else — "survey this…
SkillBFreshness: B★ 81Claude Code +9 - 0.631score
fo-status-viewer
spacedock-dev
First-officer status query/mutate/display surface — the `status` command flag docs, `--set` field docs, canonical captain-facing invocations, the…
SkillBFreshness: B★ 81Claude Code +9 - 0.628score
feedback-rejection-flow
spacedock-dev
First-officer feedback-rejection routing — the correction-round record, reuse-or-fresh routing of findings to the `feedback-to` target, the reviewer re-run…
SkillBFreshness: B★ 81Claude Code +9 - 0.628score
present-gate
spacedock-dev
First-officer gate-presentation rendering — the captain-facing gate-review template and assembly rules, including workflow-owned finding labels.
SkillBFreshness: B★ 81Claude Code +9 - 0.622score
ensign
spacedock-dev
Execute workflow stage work as a dispatched worker.
SkillBFreshness: B★ 81Claude Code +9 - 0.606score
debrief
spacedock-dev
This skill should be used when the user asks to "debrief", "record what happened", "session summary", "write a debrief", or wants to capture session activity…
SkillBFreshness: B★ 81Claude Code +9 - 0.606score
refit
spacedock-dev
This skill should be used when the user asks to "refit a workflow", "upgrade a workflow", "update workflow scaffolding", or wants to bring an existing…
SkillBFreshness: B★ 81Claude Code +9
Signals
- Stars
- 81
- Forks
- 9
- Open issues
- 85
- Last commit (this folder)
- Sep 18, 2026 (1 month ago)
- Last release
- Sep 15, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- Repository
- github.com/spacedock-dev/spacedock
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from spacedock-dev
- 0.676score
first-officer
spacedock-dev
Use when running or resuming a Spacedock workflow, especially to discover a workflow, dispatch packaged workers, manage approval gates, and advance entity…
SkillAFreshness: A★ 81Claude Code +9 - 0.671score
review
spacedock-dev
Get a person's review of an artifact you produced or were handed: a plan, spec, report or other Markdown file.
SkillAFreshness: A★ 81Claude Code +9 - 0.671score
compass
spacedock-dev
Open Spacedock Compass, the local dashboard of what your coding-agent sessions are doing: sessions, subagents, progress and drift.
SkillAFreshness: A★ 81Claude Code +9 - 0.659score
fo-gate-lifecycle
spacedock-dev
Handle an engaged gate entry.
SkillAFreshness: A★ 81Claude Code +9 - 0.642score
commission
spacedock-dev
This skill should be used when the user asks to "commission a workflow", "create a workflow", "design a workflow", "launch a workflow", or wants to…
SkillAFreshness: A★ 81Claude Code +9 - 0.636score
survey
spacedock-dev
Use when arriving at or returning to a project that already has AI-agent history and you want the lay of the land before doing anything else — "survey this…
SkillBFreshness: B★ 81Claude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get fo-dispatch-recovery running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
fo-dispatch-recovery skill. Agent Mart. https://agentmart.dev/skills/spacedock-dev-fo-dispatch-recovery (last updated 2026-10-24)