fix(app): abort session on synthetic continue loop detection#793
Closed
ZeusCraft10 wants to merge 1 commit intodifferent-ai:devfrom
Closed
fix(app): abort session on synthetic continue loop detection#793ZeusCraft10 wants to merge 1 commit intodifferent-ai:devfrom
ZeusCraft10 wants to merge 1 commit intodifferent-ai:devfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@ZeusCraft10 is attempting to deploy a commit to the 0 Finance Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
|
The following comment was made by an LLM, it may be inaccurate: |
Author
|
Please note. this solution was suggested by claude code. I myself independently reproduced the issue, and verified that this fixes the problem, and looked at the code myself, to verify the fix is correct. I am open to any changes requested. |
…nt-ai#777) When the LLM outputs "Suggested next steps for continuation" at the end of a work summary, OpenCode sends a synthetic "continue" prompt which triggers another summary, creating an infinite loop. The existing diagnostic code detected this (3+ synthetic continues in 60s) but only logged a warning. Now calls session.abort() on first loop detection to break the cycle. Uses a per-session Set to ensure abort fires only once per session.
f9d5a01 to
d85ec41
Compare
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.
Summary
Why
Issue
Scope
session.ts: addedabortSessioncallback to store options, call it when loop threshold (3+ synthetic continues in 60s) is hit, track per-session to only abort onceapp.tsx: wire the existing abort function into the session storeOut of scope
Testing
Ran
pnpm typechecknode packages/app/scripts/health.mjsnode packages/app/scripts/sessions.mjsResult
Bug verification
CI status
Manual verification
Evidence
Risk
Rollback