Repository navigation
Conversation
This was referenced Sep 27, 2026
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.
Summary
Implement one shared context budget for instructions, tool schemas, current-turn content, Memory history, RAG evidence and response reserve. Agents reassembles context before every model call; mandatory content takes priority, followed by accepted evidence and then newest complete history groups within configurable message/token limits. Accounting is explicitly estimated, and mandatory overflow stops execution before another model call.
Preserve tool-call/result relationships and stable citation mappings across continuations. OpenAI Responses carries ordered reasoning output, including encrypted reasoning, through budgeted invocation-local snapshots without restoring excluded history through a previous-response chain. Empty completions and pre-delta provider failures retain the latest call's budget diagnostics.
Keep continuation state out of durable Memory snapshots, serialized messages and append identity. The original version-one fixture remains unchanged, and PostgreSQL retains exact payload comparison and compatible idempotent receipts. Existing persistence, ownership and authorization boundaries remain intact.
Validation
Closes #202
Closes #233
Closes #234
Closes #235