Skip to content

fix: count rejected finish turns toward the stall limit - #140

Merged
wolfy-j merged 3 commits into
masterfrom
fix/finish-rejection-stall
Nov 9, 2026
Merged

wolfy-j merged 3 commits into
masterfrom
fix/finish-rejection-stall

Conversation

@wolfy-j

@wolfy-j wolfy-j commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

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.

@wolfy-j
wolfy-j merged commit c8587a4 into master Nov 9, 2026
8 checks passed
@wolfy-j
wolfy-j deleted the fix/finish-rejection-stall branch November 9, 2026 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant