You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: "Auto mode" LLM model classifier auto-approval for permissions #37564
Essential request is to implement opencode desired version of what exists similarly in other agentic coding harnesses: Claude Code auto mode, Codex auto-review, and Copilot CLI v1.0.69/allow-all auto mode, etc.
add an opt-in gate on the auto-approve path - model checks the call, unsafe ones fall back to ask rather than running silently
Yeah had seen that in other referenced PR, although still felt maybe this could be justified as a native built-in feature of opencode proper; available as a default for users who may not be as inclined to set this up as plugin
Thanks for pointing that out though, I'll check that out in the meantime 👍
as far as the LLM judge model selected, what is the typical recommendation - should it be a "haiku-tier" model, or could even be some lower non-reasoning model variant etc. ? (I happen to have Copilot subscription, so within those models available - for me cost is not really an issue, more concerned with latency/performance comparison to effectiveness of LLM judge and ultimately prioritizing it catching any potentially harmful or unintended commands)
I've got a working implementation of this in #39015 if it's useful, behind an experimental.auto_approve flag.
Before anyone spends time on it, is a native version something you'd want or is the OpenGuardrails plugin the intended approach? Happy to close if latter.
Case for native: it works with no config on a default install, deny rules and existing always grants keep working, and subagent sessions are never auto-approved since a subagent's prompt is model written. In a plugin the permissions evaluation will be outside core.
I implemented it on a fork we've been using internally and it works pretty well, a little conservative but better than overly permissive --auto. Figured the community might find it useful.
Reacted by Dylan Barnett, Israel Perez, Kyle Manna, Adriel Martins, Kenneth and Mauricio Scheffer
OpenGuardrails doesn't appear to see the actual user request, so it can't judge intent, and having to install a plugin for this feature is inconvenient. The plugin also seems to be maintained halfheartedly. I'd find it super useful if this were incorporated as a first-class feature.
Reacted by Dylan Barnett, Brown Berine, Israel Perez, Adriel Martins, Jared Rhizor and KurisuWataru
I've got a working implementation of this in #39015 if it's useful, behind an experimental.auto_approve flag.
Before anyone spends time on it, is a native version something you'd want or is the OpenGuardrails plugin the intended approach? Happy to close if latter.
Case for native: it works with no config on a default install, deny rules and existing always grants keep working, and subagent sessions are never auto-approved since a subagent's prompt is model written. In a plugin the permissions evaluation will be outside core.
I implemented it on a fork we've been using internally and it works pretty well, a little conservative but better than overly permissive --auto. Figured the community might find it useful.
yes I think a truly supported OpenCode native version ~along the lines of what you have implemented (admittedly I did just briefly use AI to analyze your PR to compare/contrast with the other alternatives I initially brought up), but seems directionally aligned with what I would expect functionality to converge around) would be desired approach.
+reiterating and agreeing with sentiments additionally of the comment above as well, imo also preferred as incorporated as a first-class feature
Reacted by ✦ freddie, Mayank Singh, Robin Franken, Israel Perez, Adriel Martins, KurisuWataru and Sid Chang
/auto-mode to do all tasks without waiting me to aprove , helps the user to spend less time on desktop to aprove or just to say proceed doing next task
it's a good idea to make users have a better experience using opencode and make things easier
I've got a working implementation of this in #39015 if it's useful, behind an experimental.auto_approve flag.
Before anyone spends time on it, is a native version something you'd want or is the OpenGuardrails plugin the intended approach? Happy to close if latter.
Case for native: it works with no config on a default install, deny rules and existing always grants keep working, and subagent sessions are never auto-approved since a subagent's prompt is model written. In a plugin the permissions evaluation will be outside core.
I implemented it on a fork we've been using internally and it works pretty well, a little conservative but better than overly permissive --auto. Figured the community might find it useful.
Thanks for sharing this implementation. I think it is largely working, i had to change the rules around a little bit to fit my needs (as you mentioned it is "a little conservative"). Some additions i made also includes, reusing the model picker to set the model for reviewer model. I also rerouted --auto to use the review mode instead because honestly --auto is just a little deceptively intelligent to me when it is just approving everything.
I vibecoded (based on yet another plugin but I think mine is better tbh) a plugin that does that for ask permissions and it can be zeroconf (will use Jev/Jev free from OpenCode Zen) if you have logged in OpenCode Console surfaceflinger/jew-guard
Activity
austinbutler commentedon Jul 18, 2026
It seems like they preferred using OpenGuardrails.
dylbarne commentedon Jul 19, 2026
Yeah had seen that in other referenced PR, although still felt maybe this could be justified as a native built-in feature of opencode proper; available as a default for users who may not be as inclined to set this up as plugin
Thanks for pointing that out though, I'll check that out in the meantime 👍
as far as the LLM judge model selected, what is the typical recommendation - should it be a "haiku-tier" model, or could even be some lower non-reasoning model variant etc. ?
(I happen to have Copilot subscription, so within those models available - for me cost is not really an issue, more concerned with latency/performance comparison to effectiveness of LLM judge and ultimately prioritizing it catching any potentially harmful or unintended commands)
mayanksingh09 commentedon Jul 28, 2026
I've got a working implementation of this in #39015 if it's useful, behind an
experimental.auto_approveflag.Before anyone spends time on it, is a native version something you'd want or is the OpenGuardrails plugin the intended approach? Happy to close if latter.
Case for native: it works with no config on a default install,
denyrules and existingalwaysgrants keep working, and subagent sessions are never auto-approved since a subagent's prompt is model written. In a plugin the permissions evaluation will be outside core.I implemented it on a fork we've been using internally and it works pretty well, a little conservative but better than overly permissive
--auto. Figured the community might find it useful.thomas-schweich commentedon Jul 29, 2026
OpenGuardrails doesn't appear to see the actual user request, so it can't judge intent, and having to install a plugin for this feature is inconvenient. The plugin also seems to be maintained halfheartedly. I'd find it super useful if this were incorporated as a first-class feature.
dylbarne commentedon Jul 29, 2026
yes I think a truly supported OpenCode native version ~along the lines of what you have implemented (admittedly I did just briefly use AI to analyze your PR to compare/contrast with the other alternatives I initially brought up), but seems directionally aligned with what I would expect functionality to converge around) would be desired approach.
+reiterating and agreeing with sentiments additionally of the comment above as well, imo also preferred as incorporated as a first-class feature
UzumakiNaruto123er commentedon Aug 5, 2026
/auto-mode to do all tasks without waiting me to aprove , helps the user to spend less time on desktop to aprove or just to say proceed doing next task
it's a good idea to make users have a better experience using opencode and make things easier
Martins6 commentedon Aug 22, 2026
So...no way to make this more visible for the opencode team? Because we got PR, plugins, etc... is there a easy way to get some eyes from the oc team?
YesYouKenSpace commentedon Sep 22, 2026
Thanks for sharing this implementation. I think it is largely working, i had to change the rules around a little bit to fit my needs (as you mentioned it is "a little conservative"). Some additions i made also includes, reusing the model picker to set the model for reviewer model. I also rerouted
--autoto use the review mode instead because honestly--autois just a little deceptively intelligent to me when it is just approving everything.lenucksi commentedon Sep 23, 2026
Might this be a case for the Jev/Kev/Leya Models?
surfaceflinger commentedon Oct 15, 2026
I vibecoded (based on yet another plugin but I think mine is better tbh) a plugin that does that for ask permissions and it can be zeroconf (will use Jev/Jev free from OpenCode Zen) if you have logged in OpenCode Console surfaceflinger/jew-guard
opencode: ask for every action, reviewed by an auto-mode plugin