Repository navigation
feat(agent): recover once from headless response truncation - #45
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 headless task previously stopped on its first
max_tokensresponse even when work time and replies remained. Allow one continuation within the original deadline, reply budget, and token cap. Discard unexecuted tools and incomplete thinking from the truncated response; continue from confirmed tool results and current files. Record recovery in Journal/ATIF and retain usage/cost accounting. A second truncation stops the run, and interactive behavior is unchanged.Tests cover continuation, partial-tool safety, unchanged budgets, accounting, transport retries, and ATIF compatibility. CI passes on Python 3.13 and 3.14, including Harbor workflow contracts. The PR includes the 0.10.x Unreleased changelog, bilingual CLI/protocol documentation, and synchronized development notes.
The initial experiment passed 2/2 without truncation. The six-run follow-up passed 4/6: model extraction 1/3 and Scheme 3/3, with no unscored trials. One extraction run truncated on its second response, then completed 15 more model replies and 14 tool executions after recovery. It still failed because one of 30 weight rows was unmatched. This demonstrates useful continuation, but not recovery to a passing score. No Scheme run exercised recovery.
Both experiments preserve task revisions, images, and budgets, with predeclared configurations and all outcomes recorded. All eight native trajectories validate. Verifier dependency profiles explicitly report
not_configured; installation successes are recorded separately. The released 18/20 baseline remains unchanged.