fix: stop repeated identical tool call loops - #46272
Conversation
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
However, there is already a solution for such cases:
For fully automatic operation, it is better to set it to "deny". It looks like the pull request duplicates existing functionality. Or does it solve the problem in a new way? |
Ultraworked with [omo](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
d87794c to
d2263e5
Compare
|
It overlaps with I rebased the branch onto the current |
Issue for this PR
Closes #45442
Related: #43603
Type of change
What does this PR do?
Stops a session after 10 consecutive calls with the same tool name and canonical arguments. Before returning to idle, it emits a visible session error so repeated read loops do not continue indefinitely. Tests cover the threshold, below-threshold calls, and alternating arguments.
How did you verify your code works?
bun test packages/opencode/test/session/prompt.test.ts— 61 passed, 1 skipped, 0 failedbun turbo typecheck— 30/30 packages passedScreenshots / recordings
Not applicable; this is not a UI change.
Checklist