anomalyco / anomalyco/opencode

bash permission escape via `--` double hyphen

Open
#39,931 3 comments 0 reactions 1 assignee View on GitHub

@rekram1-node is already working on this.

Since Jul 31, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

Bash commands containing -- bypass "bash": "ask" bash permission.

Plugins

No

OpenCode version

1.18.10

Steps to reproduce
  1. create a new empty folder
  2. create ./opencode.json configuration file with the following content
{
  "$schema": "https://opencode.ai/config.json",
  "permission": {
    "*": "ask",
    "bash": "ask"
  }
}
  1. start opencode
  2. ask a model to run git diff
  3. a "Permission required" displayed as expected
  4. reject it
  5. ask the model to run git diff --
  6. the model will run it without asking permission
Screenshot and/or share link
Image
Operating System

Windows 11

Terminal

Windows Terminal

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.