Repository navigation
acp: explain output-length continuation exhaustion instead of naming it (#1893) - #1894
Merged
Merged
Conversation
…it (#1893) The bounded output-length allowance (#1646) ends a turn with error.OutputLengthExceeded once its four continuations are spent. Every surface explained that except ACP: agent_length.afterStep calls sayApiError with exhausted_message ("work is partial and has been preserved. Send a new message or resume to continue") just before returning the error, and the line REPL and one-shot path print it — but `root.out` is null inside an ACP session, so that sentence went to stderr and the JSON-RPC reply carried only `{"code":-32603,"message":"OutputLengthExceeded"}`. describeError already had the cure for the identical EmptyCompletion loss (#1802): describe the failure in words the user can act on. Route OutputLengthExceeded through the same arm, reusing agent_length.exhausted_message. No new wording, and nothing about the turn changes: the continuation cap, the retry ladder, and the retained partial history are untouched — only the description the client is handed. Test asserts the description is the explanation (with or without a parked last_api_error) and never @Errorname; it fails if the arm is removed. Co-Authored-By: Codegraff <blackfloofie@codegraff.com>
justrach
added a commit
that referenced
this pull request
Nov 12, 2026
…n, detached cold catalog) and ACP output-length explanation (#1893) Release notes and what's-new text for v0.302.74.65, and bump test_count_baseline to 3945: the startup stack (#1896) grew the suite from 3927 to 3944 and the #1893 fix (#1894) added one more; measured on the merged main (cbeccc7) with scripts/eval/tier1_test_binary.py scan, suite green via zig build test. Co-Authored-By: Codegraff <blackfloofie@codegraff.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.
Fixes #1893.
A turn that exhausts the output-length continuation allowance ended with
session/prompt: OutputLengthExceeded (code -32603). The explanation existed but was never read:v0.302.74.64:src/agent_length.zig:10-12records the recovery text immediately before returning the error, whilev0.302.74.64:src/acp_live_turn.zig:333-337special-cases only EmptyCompletion and otherwise falls through to@errorName(err).Add the matching OutputLengthExceeded arm, reusing the existing explanation in the same shape as the EmptyCompletion arm from #1802. No new wording, and no change to the continuation cap, retry policy or partial history: an intentional bounded stop is now described as one, rather than as an opaque internal failure.
Coverage: a describeError test asserting the explanation is returned instead of the error name; it fails when the arm is removed. Full suite green (
3878 passed; 6 skipped; 0 failed), tier 1 fmt/reach/sdk green.