Tell an abandoned draft apart from a live turn, and name a remedy that works (#21) - #91
Merged
Merged
Conversation
…t works (#21) A message to a builder holds with reason 'busy' and never delivers, because the agent left text in its own composer -- Claude Code's suggested next action, e.g. "spawn a real opencode builder and send it a message". Verified five times on 2026-08-21 by reading the terminal buffer directly via GET /api/terminals/<id>/output. Sixteen dismissed/busy rows in the mailbox are almost all from clearing these by hand. The gate is right every time: injecting into a composer holding text would corrupt the agent's input. What was missing is that the operator could not tell what they were looking at, and the documented escape does not work. Two opposite situations arrived as the same word. `user-text` is a draft the agent abandoned and will never clear on its own -- safe for a human to clear. `busy-indicator` is an agent mid-turn -- clearing there corrupts a live turn. The gate distinguishes them internally and the distinction stopped there, so `reason` read 'busy' for both. Migration v20 records the gate's detail on the row; `afx inbox` shows it in place of the bare reason, and `afx inbox show` renders it as "Gate saw", with "not recorded" for rows held before the migration. And the alert named the wrong command: > Remedy: run 'afx inbox' to inspect; 'afx interrupt builder-x' clears a stuck composer. `afx interrupt` sends ESC. ESC does not clear typed text, so running it changed nothing and the alert fired again three minutes later. What works is `afx send <id> --interrupt`, which sends Ctrl+C first -- documented as a way to send a message, not as the remedy for this state, so nobody found it. `heldRemedy` now picks the advice from the detail: the clearing command for an abandoned draft, "wait, do not touch it" for a live turn, and for anything else an explicit "the gate could not read a ready prompt" rather than a remedy for the wrong problem. It says outright that afx interrupt sends ESC and does not clear typed text, because someone who has been running it needs to know why it changed nothing. The same correction is applied to the `afx status` escalation lines and surfaced in `afx inbox` itself, where it is actually read. Migration chain extended for v20 in the same pass rather than after the convergence test caught it, and hold_detail declared LAST in GLOBAL_SCHEMA to match ALTER TABLE order. Not done: issue items 2 and 4 -- auto-clearing a hold that can never resolve, and `afx interrupt` refusing to send Enter at a selection dialog. Both need a decision rather than a fix; tracked separately. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #21 items 1 and 3.
A message to a builder holds with reason
busyand never delivers, because the agent left text in its own composer — Claude Code's suggested next action, e.g.spawn a real opencode builder and send it a message. Verified five times on 2026-08-21 by reading the terminal buffer directly viaGET /api/terminals/<id>/output. Sixteendismissed/busyrows in the mailbox are almost all from clearing these by hand.The gate is right every time. Injecting into a composer holding text would corrupt the agent's input. What was missing is that the operator could not tell what they were looking at, and the documented escape does not work.
Two opposite situations arrived as the same word
user-textbusy-indicatorThe gate distinguished these internally and the distinction stopped there —
reasonreadbusyfor both. Migration v20 records the gate'sdetailon the row.afx inboxshows it in place of the bare reason;afx inbox showrenders it asGate saw, with— (not recorded)for rows held before the migration.The alert named the wrong command
afx interruptsends ESC. ESC does not clear typed text, so running it changed nothing and the alert fired again three minutes later. What works isafx send <id> --interrupt, which sends Ctrl+C first — documented as a way to send a message, not as the remedy for this state, so nobody found it.heldRemedynow picks the advice from the detail:afx send builder-x --interrupt "<message>"… (sends Ctrl+C first, which clears the line — 'afx interrupt' sends ESC, which does not)It says outright that
afx interruptsends ESC and does not clear typed text, because someone who has been running it needs to know why it changed nothing. The same correction is applied to theafx statusescalation lines and surfaced inafx inboxitself, where it is actually read.Not done
Items 2 (auto-clear a hold that can never resolve) and 4 (
afx interruptrefusing to send Enter at a selection dialog — the one that nearly deactivated a workspace on 2026-08-21). Both need a decision rather than a fix. Tracked separately.Verification
tsc --noEmitcleanreasonand distinguishable onhold_detailhold_detaildeclared LAST inGLOBAL_SCHEMAto match ALTER TABLE order_migrationsat 20🤖 Generated with Claude Code