Repository navigation
fix: auto-continue when a turn ends on reasoning or a tool message - #1879
Merged
Merged
Conversation
6 of 12 tasks
avoidwork
added a commit
that referenced
this pull request
Nov 18, 2026
Resolve the conflict in src/tui/conversationArea.js between this branch's loop strike handling and main's #1879, which widened shouldAutoContinue to turns that end on a tool message and skips interrupted turns. Keep both: the loop nudge/compact block stays ahead of auto-continue, and the auto-continue comment takes main's wording. Apply main's interrupted rule to the loop path as well. A turn paused on a clarify interrupt is waiting for the user's answer, so decideLoopAction now ignores it and records no strike, rather than nudging or compacting a paused turn. autoContinueLimit stays read once from config, so main's ?? 1000 fallback in runTurn is not reintroduced.
6 of 12 tasks
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.
Description
The silent "Continue" nudge only fired when a turn ended on reasoning, so a turn that ended on a tool message stalled with no final answer.
shouldAutoContinuenow also fires ontoolandon_tool_end, and skips interrupted turns (e.g.clarify) andon_tool_start. Implements the updatedtui-streamingrequirement inopenspec/specs/tui-streaming/spec.md.Type of Change
Testing
Added cases to
tests/unit/tui/conversationArea.test.jsfortool,on_tool_end,on_tool_start, and interrupted turns.npm test: 5380 passed, 0 failed.npm run lint: 0 errors (1 existingno-new-arraywarning intests/unit/vector/audit-fixes.test.js, untouched).Coverage
src/stream/consume.jscoverage is identical tomain.src/tui/conversationArea.jsis excluded from the coverage report bynpm run coverage; its logic is covered by theshouldAutoContinueunit tests. Overall lines moved 93.34% to 93.32% from drift indeepAgents.js,modelInfo.jsandopenai.js, which this PR does not touch.coverage.txtis not changed in this PR.Checklist
npm run lintpasses