Repository navigation
Report safe token counting diagnostics separately from compaction - #14
Merged
Merged
Conversation
This was referenced Oct 8, 2026
Merged
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.
Distinguish a provider token-counting failure from a compaction or foreground generation failure. Project only its category, HTTP status, request ID, bounded attempt count, and manual retry guidance into the generation failure event. Never copy SDK bodies or prompt data.
This does not add automatic turn or generation retries. The provider exception remains non-retryable by the outer execution loop; its separate diagnostic describes whether a later explicit continuation may succeed.
Validation in the project-owned DTU: 139 loop tests passed and the final 10 failure-projection tests passed. The provider is optional and is not imported by the core loop.
Related changes: provider #123, context #21, loop #14, Unified #468. Deploy the context and loop changes before or alongside the provider change.