Repository navigation
Description
A message to a builder holds with reason busy and never delivers, because the agent left text in its own composer. The gate is correct. Nothing clears the text, so the wait never ends.
Hit five times on 2026-08-21, each needing manual intervention. mailbox currently records 16 dismissed/busy rows, nearly all from clearing these by hand.
Mechanism
After a turn ends, Claude Code leaves a suggested next action sitting in the composer, e.g.
spawn a real opencode builder and send it a message
keep it, re-request the gate
Retry the deactivate call
Verified by reading the terminal buffer directly via GET /api/terminals/<id>/output on five separate occasions.
classifyBuffer sees a non-empty composer and returns not-clean. Correct: injecting there would corrupt the agent input. But:
- the agent will not clear its own composer, it is idle and waiting
- the gate will not deliver until it is clear
- nothing else touches it
Deadlock. The message sits until a human intervenes.
The alert names the wrong remedy
The stuck-mailbox notification says:
Remedy: run
afx inboxto inspect;afx interrupt builder-xclears a stuck composer.
afx interrupt sends ESC. ESC does not clear typed text in the composer. Running it changes nothing and the alert fires again three minutes later.
What actually works is afx send <id> --interrupt, which sends Ctrl+C first and clears the line. That is documented as a way to send a message, not as the remedy for this state, so nobody finds it.
Worse, afx interrupt defaults to ESC followed by Enter. When the composer holds a selection dialog rather than free text, that Enter selects the highlighted option. On 2026-08-21 the highlighted option was Retry the deactivate call, which would have deactivated the whole workspace and killed the architect session. ESC dismissed the dialog first, so the Enter landed harmlessly, but that was ordering luck.
Fix
- Correct the alert. Name
afx send --interrupt, notafx interrupt. This alone removes most of the pain. - Make the hold recoverable. A message held on
busyfor N minutes against an otherwise idle agent should either clear the composer itself, or escalate with the working command. A hold that can never resolve on its own is not a hold, it is a drop. - Distinguish idle-with-prefill from genuinely busy. They are the same
busyreason today. The first is safe to clear, the second is not. The render gate already knows the screen; it can tell an idle composer holding text from an agent mid-turn. afx interruptshould not send Enter by default, or should refuse when the screen shows a selection dialog. Sending Enter at an unknown dialog is a destructive act chosen by whatever happens to be highlighted.
Note
This is not the render gate being wrong. It is right every time. The gap is that nothing owns clearing a prompt the agent abandoned, and the documented escape does not work.
Activity
pseudoseed commentedon Aug 22, 2026
Confirmed cause, and a working mitigation
The repo owner disabled Claude Code suggested replies via
/config. The deadlock stopped completely, in both directions.That confirms the mechanism reported above: the composer holds text the agent did not type and will not clear, the gate correctly refuses to type over it, and nothing owns clearing it.
Deprioritised, not fixed. The mitigation is enough for now.
What the mitigation does not cover
It is a per-user client setting, not a property of this system. It protects one machine. A new machine, a reset preference, or a Claude Code default change reintroduces it with no warning and no obvious link back to this issue.
Suggested replies are one source of prefill, not the only one. Any text left in a composer produces the same deadlock: a dialog, a partially typed message, a paste. The mechanism is untouched.
The alert is still wrong regardless. It says:
afx interruptsends ESC, which does not clear typed text.afx send <id> --interruptsends Ctrl+C and does. That is a documentation defect independent of prefill, and it costs a person time every occurrence. Worth fixing on its own even while the rest waits.Direction nobody had considered
Originally reported as a builder unable to receive. It also happens architect-side: on 2026-08-21 builder
pir-13sent three reports that sat 25 minutes because the ARCHITECT composer was busy. From the owner side that looked like a hung builder. It was not — the builder was idle and waiting, correctly, since writing a PTY directly is what this design forbids.The builder own note is the useful design input: it could not tell whether
busymeant working or wedged, so it checked Tower read-only to confirm something was alive to receive. A held message is only safe if a recipient exists. If the alert grows a builder-side direction, that liveness check is the piece worth building in.Suggested reduced scope
Fix item 1 from the original list only — correct the alert to name
afx send --interrupt. Leave the rest until the mitigation stops holding.Merge pull request #91 from pseudoseed/fix/21-mailbox-prefill-deadlock
pseudoseed commentedon Aug 24, 2026
Items 1 and 3 shipped in #91.
Item 3 — migration v20 records the gate's
detailon the held row, souser-text(an abandoned draft, safe to clear) is no longer the same word asbusy-indicator(a live turn, must not be touched).afx inboxshows it in place of the bare reason;afx inbox showrenders it asGate saw, with— (not recorded)for rows held before the migration.Item 1 — the remedy is now chosen by that detail:
user-text→afx send <id> --interrupt "<message>", with an explicit note thatafx interruptsends ESC and does not clear typed textbusy-indicator→ wait; do not clear a live turnCorrected in the starvation notice, in the
afx statusescalation lines, and inafx inboxitself where it is actually read.Items 2 and 4 are split out because each needs a decision rather than a fix:
afx interruptsends Enter by default, which selects whatever a dialog has highlightedFix #196: route --interrupt through both halves of its contract