Skip to content

[FEATURE]: Color Code Commands in Permission Required Box #55486

Open

Description

@jmitchellCloudflare

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

Problem to Solve
One of the challenges of safely running AI agents is catching when they are going to do something concerning before they do it, rather than afterwards. When running agents for multiple hours per day, it is easy to fall into the habit of blindly clicking the allow once button rather than really looking at the commands to be run, simply because it might be 15 lines of allowed commands with a single portion of an ask command somewhere in the middle. If the commands were color coded, the users eye would be immediately draw to what portion of the command they had previously configured to be asked about.

Minimum Viable Feature
The feature request here is to allow for individual commands in the permission required box to be colored based on what the result of the rule that matched on them: Green for "Allow", Dark Green for "Ask" but previously allow always in the session, Yellow for "Ask".

alternatively phrase: Color code the shell commands that opencode is requesting to run based on the users configured permissions, allowing users to see what portion(s) of the command are requiring "Ask"ing their input.

Why this can't be resolved with a Plugin
Unfortunately plugins aren't an option because server plugins cannot draw in the permission prompt and TUI plugins can only draw in the terminal. Since this is a feature request for the desktop app, it has to be done via a pull request against the opencode repo.

Stretch Features

  • identify which rule each command matched, provide a tooltip at the end of rows that shows the rule that matched
  • Configure the colors for the three states, "Allowed", "Allowed in Session", and "Ask" alongside code coding for themes.
  • Allow for individual characters to be color coded, allowing for which portion of a line that matched a rule to be highlighted. Ex a rule that limits otherwise safe commands like wc -l from writing files via >> would only highlight the >> xyz.txt portion of a command like "wc -l test.txt >> xyz.txt

Activity

  1. opencode-agent commented on Oct 14, 2026

    @opencode-agent
    Contributor

    Thanks for the detailed write-up! You're asking for the permission prompt in the desktop app to colour each command by how your permission rules evaluated it (allowed, allowed by an earlier "allow always", or needs approval), so the part that actually needs your approval stands out in a long command. The stretch goals are showing the matched rule and making the colours themeable.

    You're right that a plugin can't do this today. The permission request sent to the app only has the list of commands, not the result for each one, and plugins can't change how the prompt is drawn. Supporting it would first mean adding a per-command result (and ideally the matched rule) to the permission request.

    Maintainers will consider it. Related issues, though none ask for the same thing:

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

Metadata

Metadata

Assignees

No one assigned

    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