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
A kept-alive claude CLI that stops reading stdin hangs the turn silently, forever #178
Recorded as the standing remainder in docs/ISSUES.md:9: a kept-alive claude CLI child that stops reading stdin without ever exiting hangs the turn silently, forever. The respawn-on-exit fix only triggers on process exit, and the phantom-hold only resolves on exit or real content. Grep for any watchdog/stall timer in electron/runner.js: nothing. Wall-clock watchdogs were rejected for good reasons (slow first tokens, see ISSUES.md:6), so this needs a different signal.
Impact
This is the same "turn checkmarks then nothing happens" class as #17, which took three rounds to fix; the remaining variant has no detection at all. The thread sits at "working" with all activity lost to the void.
Fix direction
Options to evaluate: a stdin-write ACK from the CLI protocol, a per-turn correlation id if the CLI grows one, or a very long (10+ min) stall that at least surfaces the state to the user without auto-killing.
Probe of the real claude CLI 2.1.219 (grok worker, logs /tmp/solenta-178-probe.log) settles the fix direction: a reused kept-alive child ACKs a stdin turn in milliseconds, long before any model work.
Turn 2 delivered on the live child's stdin:
command_lifecycle {"state":"queued"} at +0ms (carries command_uuid = the uuid we set on the user line — the per-turn correlation id ISSUES.md wished for)
system/init at +31ms (+46ms in a second run without the uuid)
first thinking_tokens only ~800ms later
So the old objection ("no timeout can be short enough to catch a dead CLI and long enough to survive a slow first token") does not apply: we time the first LINE of any kind, not the first token, and only on the warm reuse path.
Fix: on reuse only, a 60s no-any-event timer kills the wedged child; the existing exit-triggered respawn at electron/runner.js:2040 then resumes the same session. No new respawn logic, no CLI flag.
Rejected: --replay-user-messages (echo arrives late, after thinking, and would feed our own prompt back through the <task-notification> scan at runner.js:1642).
Aside: the comment at runner.js:2205 ("a reused process emits no second system/init") is wrong for 2.1.219 — turn 2 does emit one.
Activity
currentbits commentedon Aug 17, 2026
Probe of the real claude CLI 2.1.219 (grok worker, logs
/tmp/solenta-178-probe.log) settles the fix direction: a reused kept-alive child ACKs a stdin turn in milliseconds, long before any model work.Turn 2 delivered on the live child's stdin:
command_lifecycle {"state":"queued"}at +0ms (carriescommand_uuid= theuuidwe set on the user line — the per-turn correlation id ISSUES.md wished for)system/initat +31ms (+46ms in a second run without the uuid)thinking_tokensonly ~800ms laterSo the old objection ("no timeout can be short enough to catch a dead CLI and long enough to survive a slow first token") does not apply: we time the first LINE of any kind, not the first token, and only on the warm reuse path.
Fix: on reuse only, a 60s no-any-event timer kills the wedged child; the existing exit-triggered respawn at
electron/runner.js:2040then resumes the same session. No new respawn logic, no CLI flag.Rejected:
--replay-user-messages(echo arrives late, after thinking, and would feed our own prompt back through the<task-notification>scan at runner.js:1642).Aside: the comment at runner.js:2205 ("a reused process emits no second system/init") is wrong for 2.1.219 — turn 2 does emit one.
Merge pull request #212 from currentbits/coder/a-kept-alive-claude-cl…