Repository navigation
fix(writing): finish requests when Claude exits without an answer - #2402
Merged
Merged
Conversation
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.
A Claude child that exited without a result left Write for Me waiting for its timeout. Observe output closure after buffered JSON is consumed, replay it to late observers, and finish stream/structured requests through the existing once guard. A final answer wins before EOF; failed sends receive the same bounded lifecycle error. Default spawning, opt-in gates and timeout durations remain intact.
The inspected NextSentenceExit filter passed 11 assertions using only owned fixed shell children and manually fired timeout callbacks. Omitting the two request end registrations produced four failures while seven result/EOF/late-observer controls passed. Tests check completion/exit ordering without sleeps or elapsed-time assertions, log only fixed outcome labels, and await child exit before guarded fixture cleanup.
On cad31bd, guarded check.sh passed 23 checks and explicitly BLOCKED the full fast suite (exit 3): overall FAIL, source stable/clean. Standalone preflight passed. App build, concurrency census and runner-completion checks passed. Full-suite proof awaits isolated validation. verify-change.sh marked UI SKIP because Transcripted was running; nothing was quit or launched.
Independent full diff and fixture-safety review against fetched origin/main: GREEN, including termination notification and serialized callback boxing. No real Claude/model/account, window capture or cloud call was used. Stderr-backed error-result handling remains outside this focused proof; #2336 owns its separate fix and overlaps the LineProcess fast-source-list entry. Keep one list entry when integrating. Draft only; no merge requested.