feat: Make breaking the agent loop on a tool deny configurable
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.jsonschema? I had some issues getting that sorted locally
Build issues should be sorted now
Friendly pinging @rekram1-node in case this PR was missed (as per comment on another PR)
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
@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