Uh oh!
There was an error while loading. Please reload this page.
fix(desktop,runtime): interrupt and bound empty assistant loops - #4138
Open
Rangsh wants to merge 1 commit into
Open
fix(desktop,runtime): interrupt and bound empty assistant loops#4138Rangsh wants to merge 1 commit into
Rangsh wants to merge 1 commit into
Conversation
Interrupt the active desktop turn before sending a plain Enter follow-up, and clean up transient messages retracted by the stop operation. Bound repeated textless tool steps when no explicit maxSteps is configured, while preserving normal multi-step workflows and explicit step limits. Fixesapache#4083
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 freeto 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.
Interrupt the active desktop turn before sending a plain Enter follow-up, and clean up transient messages retracted by the stop operation.
Bound repeated textless tool steps when no explicit maxSteps is configured, while preserving normal multi-step workflows and explicit step limits.
Fixes#4083
Summary
Desktop mid-turn plain Enter used to queue a follow-up, so a runaway empty-reply loop never stopped and the typed message could not take effect. Plain Enter now interrupts the active turn first, then starts a new root send; Shift+Enter still steers. In the runtime agent loop, when
maxStepsis unset, consecutive identical textless tool-only steps are capped so the turn ends instead of flooding blank assistant replies, without changing normal multi-step work or explicit step budgets.Fixes#4083
Verification
node --test --test-name-pattern="stops an unbounded loop after consecutive identical empty" packages/runtime/dist/__tests__/ai-sdk-backend.test.js— passapache/makamainand resolved conflict with fix(runtime): preserve Plan final responses #3886 inai-sdk-backend.test.tslint/format:check/typecheck/ full workspacenpm testAI use
Select exactly one:
Tool(s) and scope:
Cursor (Composer) helped locate the empty-loop / mid-turn send paths, implement the runtime empty-step bound and Desktop interrupt-on-send behavior, add/adjust tests, and rebase through the upstream conflict. Human owns the final review and submission.
Affected commits should retain:
Generated-by: CursorChecklist
Does this PR entail a change in behavior?