Skip to content

fix(opencode): add opencode auto-approve flag#1950

Draft
janburzinski wants to merge 1 commit into
generalaction:mainfrom
janburzinski:emdash/opencode-dsp-flag-m0c9y
Draft

fix(opencode): add opencode auto-approve flag#1950
janburzinski wants to merge 1 commit into
generalaction:mainfrom
janburzinski:emdash/opencode-dsp-flag-m0c9y

Conversation

@janburzinski
Copy link
Copy Markdown
Collaborator

No description provided.

@janburzinski janburzinski marked this pull request as ready for review May 9, 2026 19:59
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 9, 2026

Greptile Summary

Adds the autoApproveFlag field to the opencode provider definition so that Emdash can launch OpenCode in auto-approve ("YOLO") mode. The chosen flag value matches what OpenCode's official CLI documentation describes for the run subcommand.

  • One-line registry change: autoApproveFlag: '--dangerously-skip-permissions' is inserted into the opencode entry in AGENT_PROVIDERS, following the exact same pattern used by Claude Code, Codex, Amp, and others.
  • Verified flag value: OpenCode's published CLI reference lists --dangerously-skip-permissions as the auto-approve flag, and an upstream feature issue confirms the same name at the top-level invocation too.

Confidence Score: 5/5

Single-field addition to a registry entry; the flag value is verified against OpenCode's published CLI docs and follows the same pattern used by every other provider in the file.

The change touches one line in a data registry with no branching logic. The flag --dangerously-skip-permissions is documented in OpenCode's official CLI reference, matches the naming pattern already used for Claude Code (the upstream project), and the surrounding provider configuration is unchanged.

No files require special attention.

Important Files Changed

Filename Overview
src/shared/agent-provider-registry.ts Adds autoApproveFlag: '--dangerously-skip-permissions' to the OpenCode provider entry — a single-field addition consistent with how other providers expose this flag; the value is confirmed in OpenCode's official CLI documentation.

Sequence Diagram

sequenceDiagram
    participant E as Emdash
    participant R as agent-provider-registry
    participant O as OpenCode CLI

    E->>R: getProvider('opencode')
    R-->>E: "{ autoApproveFlag: '--dangerously-skip-permissions', useKeystrokeInjection: true, ... }"
    E->>O: opencode --dangerously-skip-permissions
    O-->>E: TUI started (permissions auto-approved)
    E->>O: keystroke injection (initial prompt)
    O-->>E: response stream
Loading

Reviews (1): Last reviewed commit: "fix(opencode): add auto-approve flag" | Re-trigger Greptile

@janburzinski janburzinski marked this pull request as draft May 10, 2026 17:16
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.

1 participant