Repository navigation
fix: count rejected finish turns toward the stall limit - #140
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.
An exit-schema rejection leaves an agent task incomplete, but a finish call currently resets the unproductive-turn counter as though it performs work. Repeated invalid finishes therefore run to the iteration limit.
The existing stall guard now distinguishes the configured exit tool from ordinary tool and delegate work. Exit-only turns consume the existing allowance; an accepted finish completes before the failure check. The guard keeps its existing limit, saved counter and typed failure.
Validation: native stub-model tests reproduce 10 calls instead of the configured stall bound before the change. Tests pass on SQLite and PostgreSQL for repeated rejections in auto and any modes, configured allowances of 2 and 3, corrections after one or two rejections, warm-up turns, ordinary tools and delegation. Full native suites and affected lint use runtime v0.3.59a with freshly resolved dependencies. CI verifies the same runtime release.
Compatibility: no registry, configuration, contract or stored shape changes. Rejected exit-only turns now consume the existing stall allowance, so runs relying on repeated invalid finishes terminate at that configured bound.