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
{{ message }}
Repository navigation
(triggers): resume after compaction left unsubmitted in the composer under load #980
After a compaction, the resume step of a /compact → resume chain is often left in the composer with a line break instead of being submitted (workstation sessions only; the VPS uses tmux-watch). Reported by JB, measured by harness-dev on ~/.switchboard/triggers/processed: 27 of 135 two-step chains have an unconfirmed resume; since 2026-10-29 every failure is written:true, submit_retries:1, submitted:"assumed", submit_confirmed:false, turn_observed:false, waited 4.4–7 s. Successes confirm in 0.6–1 s with submit_retries:0.
Verified
First submit (submitToPty, src/main/triggers/trigger-watcher.js:280-285): text, 50 ms (DEFAULT_SUBMIT_ENTER_DELAY_MS), then '\r'. The retry (:831) is the same bare '\r'. No LF anywhere.
Example: trigger b30f6d08-7540-4d91-8a71-f8e1a44862d7 (session 22d3a9d7). Timeline: SessionStart:compact hook cancelled after 9.7 s at 06:20:03.971Z; compact_boundary 06:20:06.564Z; resume written 06:20:13.942Z (ready_source: "transcript"); retry ~3 s later; no user message with that text ever reaches the transcript; the session stayed idle until a cron prompt at 06:36. The workstation was at 100 % CPU. Same signature: 960bd4b3 (harness-dev, 04:15Z), and two supervision-locale chains on 29/10 and 31/10.
Hypothesis (not measured yet)
Under load the CLI does not read stdin for several seconds, so the text, its Enter and the retry Enter sit in the ConPTY input buffer and are read as one chunk. A multi-character chunk is handled as a paste, in which each '\r' is inserted as a newline: "text + line break, not submitted".
To do
Measure: write text\r in a single write to an idle claude in an isolated PTY; check whether it submits or inserts a newline. Same with the text wrapped in bracketed paste (\x1b[200~…\x1b[201~) followed by '\r'.
If confirmed: send the text as a bracketed paste and the Enter separately (a '\r' after the paste end stays an Enter even in the same chunk), and/or gate readiness on the CLI descriptor's idle status rather than on the transcript.
Test with the trigger-watcher fakes: the written byte sequence for a chain step.
Decided by Jean-Baptiste in person, 2026-11-03: measure H4 in an isolated instance with the existing dedicated canary token (loaded by code, never printed), then fix from the measurement. The same agreement covers the live measurements of #616.
Activity
devsuitup commentedon Nov 3, 2026
Decided by Jean-Baptiste in person, 2026-11-03: measure H4 in an isolated instance with the existing dedicated canary token (loaded by code, never printed), then fix from the measurement. The same agreement covers the live measurements of #616.