[PR #4729] feat: add experimental.continue_loop_on_deny config option #11085

Closed
opened 2026-02-16 18:15:52 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/4729

State: closed
Merged: Yes


Currently the agent loop breaks in the case of a tool deny. It means the error is not automatically sent back to the LLM, and it requires user action to continue.

My preference, and perhaps that of others, is to continue the agent loop and have the error automatically fed back to the LLM.

To support this I added a new configuration option breakLoopOnToolDeny which defaults to true (current behavior). This allows users to change this behavior through their config.

Open questions

  • Is this feature desirable?
  • Is the naming of this configuration option correct? I see both camel case and snake case for config options. Also this could've move under 'experimental' options, but I don't know what the criteria are for that.
  • Does this require a change in the OpenCode config.json schema? I had some issues getting that sorted locally
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/4729 **State:** closed **Merged:** Yes --- Currently the agent loop breaks in the case of a tool deny. It means the error is not automatically sent back to the LLM, and it requires user action to continue. My preference, and perhaps that of others, is to continue the agent loop and have the error automatically fed back to the LLM. To support this I added a new configuration option `breakLoopOnToolDeny` which defaults to `true` (current behavior). This allows users to change this behavior through their config. **Open questions** - Is this feature desirable? - Is the naming of this configuration option correct? I see both camel case and snake case for config options. Also this could've move under 'experimental' options, but I don't know what the criteria are for that. - Does this require a change in the OpenCode `config.json` schema? I had some issues getting that sorted locally
yindo added the pull-request label 2026-02-16 18:15:52 -05:00
yindo closed this issue 2026-02-16 18:15:52 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11085