Skip to content

Document the manager-captured handoff fallback in Step 4c (#95) - #99

Merged
laird merged 1 commit into
masterfrom
feature/issue-95
Aug 16, 2026
Merged

Document the manager-captured handoff fallback in Step 4c (#95)#99
laird merged 1 commit into
masterfrom
feature/issue-95

Conversation

@laird

@laird laird commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Closes #95

Problem

Step 4c assumes the manager can drive the worker via tmux send-keys. But at roughly ≥97% context the worker's input jams — sent text queues as ❯ Press up to edit queued messages and Enter does not submit it. So /clear, and any "do a handoff" instruction, cannot be driven via send-keys in exactly the situation the step exists to handle. If 4c fires late, the handoff silently fails and the worker wedges at 100% anyway.

The step previously acknowledged the jam only in passing — "the manager captures the handoff note on its behalf" — without saying how, so the recovery was not reproducible from the doc.

Changes Made

Both mirrors updated (plugins/autocoder/commands/.agent/workflows/, per the parity requirement in CLAUDE.md):

  • Explain that the jam is the reason for the 95% threshold, with the observed symptom, instead of folding it into one clause.
  • New "Fallback: worker input is already jammed (≥~97%)" subsection with the five steps observed to work:
    1. commit the worker's uncommitted edits from outside the pane,
    2. post the handoff note on the issue,
    3. issue_release the claim so the resumed worker re-claims cleanly,
    4. hard-restart the pane — a kill, not send-keys /clear, which is the thing that is jammed,
    5. resume with /autocoder:fix <n>.
  • Confirm the pane came back up before reporting recovery, since restart-worker.sh kills first (the relaunch bug is fixed separately in Fix #94: resolve claude-worker-loop.sh from the lib dir, not repo_root #96).
  • Prefer prevention: treat ≥95% as a hard trigger, and prefer a worker loop that self-hands-off before the jam over the manager catching it on a monitor tick.

Verification

  • 17/17 shell unit tests pass.
  • Both mirrors confirmed to carry the fallback.
  • Procedure is the one the reporter observed recovering two wedged workers this session with zero lost work.

Note

The .agent/ mirror already diverged from plugins/ at master (different command naming, missing Step 0). That pre-existing drift is left alone — only this change is mirrored, adapted to the Antigravity variant's conventions.

🤖 Generated with Claude Code

Step 4c assumes the manager can drive the worker via tmux send-keys, but at
roughly >=97% context the worker's input jams: sent text queues as
"Press up to edit queued messages" and Enter does not submit it. So /clear --
and any "do a handoff" instruction -- cannot be driven via send-keys in exactly
the situation the step exists to handle. If 4c fires late, the handoff silently
fails and the worker wedges at 100% anyway.

Step 4c previously noted the jam only in passing ("the manager captures the
handoff note on its behalf") without saying how, so the recovery was not
actually reproducible from the doc.

Changes (both mirrors, per the parity requirement):
- Explain that the jam IS the reason for the 95% threshold, with the observed
  symptom, so the WHY is not folded into a single clause.
- Add a "Fallback: worker input is already jammed" subsection with the five
  concrete steps that were observed to work: commit the worker's uncommitted
  edits from outside, post the handoff note on the issue, issue_release the
  claim, hard-restart the pane (a kill, NOT send-keys /clear, which is what is
  jammed), then resume with /autocoder:fix.
- Note that the pane must be confirmed up before reporting recovery, since
  restart-worker.sh kills first (see #94).
- Recommend prevention: treat >=95% as a hard trigger, and prefer a worker loop
  that self-hands-off before the jam over the manager catching it on a tick.

Verification: 17/17 shell unit tests pass; both mirrors carry the fallback.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@laird
laird merged commit a0aaf55 into master Aug 16, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

monitor-workers Step 4c: worker at high context has jammed tmux input, so self-/clear can't be sent — document the manager-captured handoff fallback

1 participant