Final answers truncated mid-sentence — max_tokens=300 cap on the chat model - #4
Merged
darieldatoon merged 1 commit intoJun 24, 2026
Conversation
The 300-token ceiling truncated long-answer responses (technical walkthroughs, code blocks) mid-sentence. 2048 is a reasonable default for a Haiku-class chat agent and resolves the response_completeness evaluator failures.
darieldatoon
approved these changes
Jun 24, 2026
darieldatoon
marked this pull request as ready for review
June 24, 2026 17:58
darieldatoon
deleted the
issues-agent/325e0632-1613-4d63-9b1d-8e0605a09019
branch
June 26, 2026 17:44
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.
The agent's LLM is constructed with a hard
max_tokens=300ceiling, so any user request that needs more than ~300 output tokens (technical walkthroughs, code-heavy explanations, multi-step setup guides) is cut off mid-sentence, mid-code-block, or mid-bullet — leaving unclosed f-strings, half-written JSON, and dangling list markers in the final assistant message. This happens systematically: every truncated trace shows the LLM span hittingoutput_tokens == 300, confirming the cap is the binding constraint rather than the model choosing to stop. The existingresponse_completenessonline evaluator is already flagging these, so the failure is observable but unfixed at the source.