You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After a /compact chain, step 1 ("Reprise après compaction : …") lands in the composer but its Enter becomes a line break; the message sits unsent while main.log says Chain step 1 sent (e.g. 2026-10-01 22:15:49 on 7615734f, step 0 at 22:13:52). Recurring.
submitToPty (trigger-watcher.js ~154-161) writes the text in one write, waits DEFAULT_SUBMIT_ENTER_DELAY_MS = 50 ms, then writes \r alone. No bracketed paste, no multi-line.
The "sent" log is emitted after submitWithVerify whatever happened. The verify (pollForBusyObserved ~316-338) is a level probe: any _cliBusy=true within 2 s passes, and _cliBusy comes from OSC titles / OSC 9;4 — so the spinner that ends a compaction satisfies it and the recovery Enter is never armed.
Readiness: before a step that follows /compact, wait for the CLI's own descriptor (~/.claude/sessions/<pid>.json) to say status: "idle" with a statusUpdatedAt after the compact step (read at CLI 2.1.286: idle = at the prompt, waiting = a dialog is open, busy = working), bounded.
Proof of submission: an edge, not a level — the descriptor going idle→busy after our write, or the transcript gaining the user line; otherwise one recovery Enter, and if that still does not submit, log a warning that names it instead of "sent".
Deciding measurement (isolated instance, real CLI): /compact → text with SWITCHBOARD_SUBMIT_ENTER_DELAY_MS 50 / 500 / 3000, with and without waiting for the descriptor's idle.
After a
/compactchain, step 1 ("Reprise après compaction : …") lands in the composer but its Enter becomes a line break; the message sits unsent while main.log saysChain step 1 sent(e.g. 2026-10-01 22:15:49 on 7615734f, step 0 at 22:13:52). Recurring.What the code shows (at 4608df0)
submitToPty(trigger-watcher.js~154-161) writes the text in one write, waitsDEFAULT_SUBMIT_ENTER_DELAY_MS= 50 ms, then writes\ralone. No bracketed paste, no multi-line.submitWithVerifywhatever happened. The verify (pollForBusyObserved~316-338) is a level probe: any_cliBusy=truewithin 2 s passes, and_cliBusycomes from OSC titles / OSC 9;4 — so the spinner that ends a compaction satisfies it and the recovery Enter is never armed..ai/contexts/trigger-watcher.md(~741-752) already records the 0.0.64 case where even a lone retry\r, seconds later, was absorbed as a newline: the CLI's post-compaction state, not the 50 ms timing, eats the Enter. fix(triggers): close two false-confirm gaps in chain submission verify #185 (settle), fix(triggers): make waitForBusyFall wait for the busy rise #190 (busy-rise wait) and themidBusygate did not touch that.Proposal
/compact, wait for the CLI's own descriptor (~/.claude/sessions/<pid>.json) to saystatus: "idle"with astatusUpdatedAtafter the compact step (read at CLI 2.1.286:idle= at the prompt,waiting= a dialog is open,busy= working), bounded.Deciding measurement (isolated instance, real CLI):
/compact→ text withSWITCHBOARD_SUBMIT_ENTER_DELAY_MS50 / 500 / 3000, with and without waiting for the descriptor's idle.