Skip to content

[FEATURE]: "Auto mode" LLM model classifier auto-approval for permissions #37564

Open

Description

@dylbarne

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Related to #33585

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

Activity

  1. austinbutler commented on Jul 18, 2026

    @austinbutler

    It seems like they preferred using OpenGuardrails.

  2. dylbarne commented on Jul 19, 2026

    @dylbarne
    Author

    It seems like they preferred using OpenGuardrails.

    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)

  3. mayanksingh09 commented on Jul 28, 2026

    @mayanksingh09

    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.

  4. thomas-schweich commented on Jul 29, 2026

    @thomas-schweich

    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.

  5. dylbarne commented on Jul 29, 2026

    @dylbarne
    Author

    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

  6. UzumakiNaruto123er commented on Aug 5, 2026

    @UzumakiNaruto123er

    /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

  7. Martins6 commented on Aug 22, 2026

    @Martins6

    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?

  8. YesYouKenSpace commented on Sep 22, 2026

    @YesYouKenSpace

    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.

  9. lenucksi commented on Sep 23, 2026

    @lenucksi

    Might this be a case for the Jev/Kev/Leya Models?

  10. surfaceflinger commented on Oct 15, 2026

    @surfaceflinger

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions