Skip to content

feat(agent): recover once from headless response truncation - #45

Merged
minixalpha merged 4 commits into
mainfrom
experiment/truncation-recovery
Oct 5, 2026
Merged

minixalpha merged 4 commits into
mainfrom
experiment/truncation-recovery

Conversation

@minixalpha

@minixalpha minixalpha commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

A headless task previously stopped on its first max_tokens response 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.

@minixalpha
minixalpha marked this pull request as ready for review October 5, 2026 15:32
@minixalpha
minixalpha merged commit c8c5bf7 into main Oct 5, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant