Repository navigation
feat(harness): keep partial replies and end crash loops visibly - #124
Merged
Merged
Conversation
…sting The fixture's afterList trigger also fired on the keyed server's listing, which usually connects first, so tokens were revoked before the secure server connected and its tool was never offered. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Aborted, failed and crash-healed replies keep their streamed parts; unfinished tool calls in them settle aborted and never run. - Streaming replies are checkpointed durably (session.llm.progress) at most once a second, so a crash keeps the partial. - A reply cut off at the output limit gives its tool calls a re-issue error and the run continues; two in a row end it as truncated. - The in-flight attempt is persisted: a request cut off by a host death counts as a failed retry attempt, and with none left the run ends as interrupted. - A crash while tools ran commits the turn with the unfinished tools aborted; that commit does not reset the restart count. - At the restart limit the run ends with session.run.failed crashloop instead of parking the thread. - Kill/reopen E2E against the real server process. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
abortedand never run. Aborted replies stay out of model context.session.llm.progress) at most once a second, so a crash loses at most about 1 s of text.truncated.thread.attempt, added in place to the init migration). A request cut off by a host crash counts as a failed retry attempt; with no retries left, the run ends asinterrupted. A clean shutdown is not counted.session.run.failed(crashloop) instead of silently parking the thread.parkedis removed from the thread info.codework runwarns and exits 1 when the final response is truncated.keyedserver's listing.Existing databases need to be recreated, because the init migration was edited in place.
Test plan
vp check,vp run typecheckpackages/codework/test/recovery.test.ts: 7 cases that SIGKILL a real server and reopen it (mid-stream, mid-tool, retries exhausted, crashloop, tool crash loop, truncated loop, loaded tools surviving a restart), each ending in an__artifacts__snapshotcli.test.ts(truncated run),cli.mcp.oauth.test.ts(3 runs in a row), and the harness runner/thread testsmodel.listtests inserver.test.tsand the model-catalog tests insettings.llm.test.ts🤖 Generated with Claude Code