Repository navigation
fix(cli): reset operational limits for each request - #364
Merged
Merged
Conversation
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 interactive session accumulated Bash/tool/write/turn counters across unrelated user requests. After earlier work reached 100 Bash commands, a new repository question could stop after only a couple of commands and subsequent follow-ups remained blocked.
Start fresh operational counters once at the beginning of each streamed user request, keeping the configured limits and accumulated session spending. Limits still apply across all model/tool iterations within a request. When an operational limit stops a run, the CLI explains that a follow-up receives fresh request limits; spending-limit messages do not make that promise.
Validation: all 156 Go packages passed with the race detector; formatting, vet, architecture boundaries, lint (zero issues), and build passed. Regression tests cover the reported 100-prior-Bash-calls case, enforcing a current request's limit, successfully answering its follow-up, resetting every operational counter, preserving configured limits, and preserving the session spending cap across follow-ups.
reflect verifypassed all 156 Go package checks. Its overall result remains failed because the existing local security log has a broken hash chain at entry 200; historical audit records are unchanged.