Stuck Crewmate Recovery
Agent Buildingstuck-crewmate-recoveryStuck Crewmate Recovery is an Agent Skill for agent building published in the kunchenguid/firstmate repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Agent-only playbook for stuck firstmate direct reports. Use after a stale wake, looping pane, repeated confusion, an answered-by-brief question, an unresponsive crewmate, or a failed steer. Escalates from peek, to one-line steer, to harness-specific interrupt, to relaunch with progress, to failed status.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/kunchenguid/firstmate/blob/HEAD/.agents/skills/stuck-crewmate-recovery/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/stuck-crewmate-recovery, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
stuck-crewmate-recovery
Use this playbook when a direct report is stale, looping, repeatedly confused, asking a question its brief already answers, unresponsive, or when a steer failed to land.
Load harness-adapters before sending an interrupt, exit command, resume command, or harness-specific skill invocation.
The target window's harness is recorded as harness= in state/<id>.meta.
Escalate in order:
- Peek the pane.
- If the crewmate is waiting on a question its brief already answers, answer in one line via
FM_HOME=<this-firstmate-home> bin/fm-send.shfrom an active firstmate session unlessFM_HOMEis already set to the active firstmate home. - If the crewmate is confused or looping, interrupt with the adapter's interrupt key, then redirect with one corrective line.
For example, for a single-Escape adapter:
FM_HOME=<this-firstmate-home> bin/fm-send.sh <window> --key Escape. - If the crewmate is genuinely wedged after redirection, exit the agent with the adapter's exit command and relaunch with the same brief plus a
progress so farnote appended to it. Genuine wedging means looping, unresponsive, repeating the same obstacle, or truly dead. A low context reading is not wedging; modern harnesses auto-compact and keep going. The worktree and commits persist, so relaunch is cheap. - If a second relaunch fails too, write
failedto the backlog and tell the captain with evidence.