Skip to content

feat: add experimental.continue_loop_on_deny config option - #4729

Merged
rekram1-node merged 2 commits into
anomalyco:devfrom
baaym:feature/configurable-break-agent-loop
Dec 14, 2025
Merged

rekram1-node merged 2 commits into
anomalyco:devfrom
baaym:feature/configurable-break-agent-loop

Conversation

@baaym

@baaym baaym commented Nov 25, 2025 •

Copy link
Copy Markdown
Contributor

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

@baaym baaym changed the title feat: Make breaking the agent loop on a tool error configurable feat: Make breaking the agent loop on a tool deny configurable Nov 25, 2025
@baaym

baaym commented Nov 26, 2025

Copy link
Copy Markdown
Contributor Author

Build issues should be sorted now

@baaym

baaym commented Dec 10, 2025

Copy link
Copy Markdown
Contributor Author

Friendly pinging @rekram1-node in case this PR was missed (as per comment on another PR)

@rekram1-node

rekram1-node commented Dec 10, 2025 •

Copy link
Copy Markdown
Contributor

maybe you can make it an EXPERIMENTAL flag or experimental config option.

Could see people wanting ore control and stuff. Also can u name it in the same format of other options

@baaym

baaym commented Dec 12, 2025

Copy link
Copy Markdown
Contributor Author

@rekram1-node thanks for your feedback! I updated the PR:

  • Moved the setting to the experimental section
  • Renamed it to break_loop_on_tool_deny

@rekram1-node rekram1-node changed the title feat: Make breaking the agent loop on a tool deny configurable feat: add experimental.continue_loop_on_deny config option Dec 14, 2025
@rekram1-node
rekram1-node merged commit 7368342 into anomalyco:dev Dec 14, 2025
2 of 3 checks passed
@baaym
baaym deleted the feature/configurable-break-agent-loop branch December 15, 2025 06:23
nalin-singh pushed a commit to nalin-singh/opencode that referenced this pull request Dec 17, 2025
rekram1-node added a commit that referenced this pull request Dec 27, 2025
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
Rwanbt pushed a commit to Rwanbt/unifia that referenced this pull request May 5, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
Rwanbt pushed a commit to Rwanbt/unifia that referenced this pull request Jun 14, 2026
MarsQiu007 referenced this pull request in MarsQiu007/openNovel Jul 31, 2026
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
meSingh pushed a commit to meSingh/opencode that referenced this pull request Sep 6, 2026
androidand pushed a commit to androidand/opencode-skein that referenced this pull request Sep 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants