Repository navigation
agent: keep the action record off the model, stop pushing back on answers - #421
Merged
Merged
Conversation
…wers - The record of what a turn did (files written, commands run) moves out of the model's answer in the session history into llm.Message.Record, which is never sent. Shown at the end of its own past answers, a weak model began ending replies with one of its own for turns that ran no tool. Compaction now builds its summary from the records and keeps them on the summary. Sessions saved before this have the lists cut from the answers. - A "(actions this turn ...)" list in a reply is the model's own, so it is cut from the answer and the user is told. - A code block in a reply with no tool call is no longer taken as a refusal. The push said "you changed nothing, make every change now" to answers to "show me"; with nothing to change, the model claimed it was writing files. The push now leaves room to answer, and each push says on screen what it is. - The goal loop stops after 3 re-feeds in a row that each ended without a tool call, and says why. - Switching models drops the old model's context size (found or set by hand). - A request the server let go silent for the whole idle window is retried with twice the wait, up to 4x idle_timeout_seconds; the read deadline and header timeout follow it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s unknown - The archive (read back by the history tool) and the summarizer's input carry the record in other words; a summary that echoes the record's form has it cut. Old sessions have only the list paragraphs cut, not the rest of an answer that went on after one. - Only a request that got no response grows the wait; a stream that started and stalled does not. - With no context size known for the model, the user is told once after a task that long tasks are not trimmed. - The goal loop's idle stop is documented. Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.
Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.
- A made-up list is cut from the reply before it joins the run's conversation, so later turns, nudges and re-feeds never show it back; the note under the answer covers any cut in the task. - The cut takes the list's own line(s) only; an answer going on after it on the next line, CRLF text and a list shown inside a code block are kept. - Compaction refuses a summary that was nothing but such a list. - Each of several records on a summary is reworded for the summarizer; the history tool rewords records in entries archived before this change; the judge's gap text has the form cut before it is re-fed. - A collapse re-fed after real work ends the idle streak. - -m drops the saved model's size, like /model. - Plain runs print the unknown-window note to stderr. - The wait grows on the last try too, and on a stream that sent headers and then nothing; a dial timeout never grows it. - Tests: the record is never in a request body in either wire format. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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 found in real sessions with a weak hosted model and a small remote one.
The action record
llm.Message.Record, which is never sent.The refusal push
The goal loop
Context window
/model, a staged model pick, and a provider edit all drop the old model's size, whether it was found or set by hand (config.LLM.SetModel). A provider moved from a 272k model to a 64k one kept 272k.Idle timeout
idle_timeout_seconds, for the rest of the client's life.Tests:
🤖 Generated with Claude Code