server: decide what claude-cli does with output that arrives after a stall or hard-timeout watchdog ended the turn

Open
#9,287 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
22/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
javascript
Domain
backend

Research direction

Start in packages/server/src/cli-session.js, where the stream-stall watchdog and the hard turn timeout end a turn with an interrupted result while the child keeps running. Read how #9267's Stop safety timer retires a child, and trace where late output from a kept child is accepted as a new message. Done means a deliberate decision for each watchdog, with a test per watchdog that pins what happens to output arriving after it fired. The decision itself needs maintainer input first.

Written by the indexing model from the issue text.

Description

bug server

Follow-up from #9267.

Context

#9267 makes claude-cli's 5 s Stop safety timer retire an unresponsive child, so a reply it produces after the turn ended is dropped and the next message starts a fresh child.

Remaining gap

The stream-stall watchdog and the hard turn timeout (packages/server/src/cli-session.js) also end a turn with an interrupted result while the child keeps running. They deliberately keep the child, and their error text tells the user to retry on it. A late reply from that child can therefore still arrive after the turn was reported as failed, and it is accepted into the session as a new message and result.

Wanted

Decide, for each watchdog, whether a late reply after it fired belongs to the conversation (keep the child, and attribute or label the late reply) or should be dropped (retire the child as #9267 does). Make the behaviour explicit and tested.

Acceptance

  • For each watchdog, a test pins what happens to output that arrives after it fired.

Related: #9267, #9241.

Dominant language
JavaScript
Stars
7
Forks
1
Avg merge
2h 3m
Merged PRs (30d)
333

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from blamechris/chroxy

All issues in blamechris/chroxy

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.