In opencode run mode, "permissions":{"bash": "ask"} hangs silently. #2313

Closed
opened 2026-02-16 17:35:05 -05:00 by yindo · 2 comments
Owner

Originally created by @ucirello on GitHub (Oct 28, 2025).

Description

I tried to get an agent to use bash to execute a command.
I did not realize that the opencode.json looked like:

        "permission": {
                "bash": "ask"
        },

When I ran the command, it would stop - and not make progress, even when I hit enter in the interface to try and unblock.

OpenCode version

0.15.18

Steps to reproduce

  1. Add this to opencode.json
        "permission": {
                "bash": "ask"
        },
  1. Run opencode run with an instruction that calls bash.
  2. Watch it hang.

Screenshot and/or share link

No response

Operating System

Darwin Kernel Version 25.0.0

Terminal

VSCode Terminal

Originally created by @ucirello on GitHub (Oct 28, 2025). ### Description I tried to get an agent to use bash to execute a command. I did not realize that the opencode.json looked like: ``` "permission": { "bash": "ask" }, ``` When I ran the command, it would stop - and not make progress, even when I hit enter in the interface to try and unblock. ### OpenCode version 0.15.18 ### Steps to reproduce 1. Add this to opencode.json ``` "permission": { "bash": "ask" }, ``` 2. Run `opencode run` with an instruction that calls bash. 3. Watch it hang. ### Screenshot and/or share link _No response_ ### Operating System Darwin Kernel Version 25.0.0 ### Terminal VSCode Terminal
yindo added the help-wantedbuggood first issue labels 2026-02-16 17:35:05 -05:00
yindo closed this issue 2026-02-16 17:35:05 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Oct 28, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #3213: Bug: opencode run and TUI exits hang on v0.15+ - Similar hanging behavior with opencode run mode specifically on recent versions
  • #2940: [BUG] OpenCode just hangs randomly after receiving instructions - Reports hanging behavior, though not specifically with ask permissions
  • #1813: Feature Request: Yolo and non-Yolo mode (auto-accept) - Discusses the ask permission system and switching between ask/allow modes

The core issue appears to be that in opencode run mode, the permission dialog for "ask" permissions doesn't properly display or accept user input, causing the process to hang silently. Issue #3213 specifically documents hanging behavior in opencode run mode on v0.15+, which aligns closely with your report.

Feel free to ignore if none of these address your specific case with bash "ask" permissions hanging in opencode run mode.

@github-actions[bot] commented on GitHub (Oct 28, 2025): This issue might be a duplicate of existing issues. Please check: - #3213: Bug: `opencode run` and TUI exits hang on v0.15+ - Similar hanging behavior with opencode run mode specifically on recent versions - #2940: [BUG] OpenCode just hangs randomly after receiving instructions - Reports hanging behavior, though not specifically with ask permissions - #1813: Feature Request: Yolo and non-Yolo mode (auto-accept) - Discusses the ask permission system and switching between ask/allow modes The core issue appears to be that in `opencode run` mode, the permission dialog for "ask" permissions doesn't properly display or accept user input, causing the process to hang silently. Issue #3213 specifically documents hanging behavior in `opencode run` mode on v0.15+, which aligns closely with your report. Feel free to ignore if none of these address your specific case with bash "ask" permissions hanging in opencode run mode.
Author
Owner

@rekram1-node commented on GitHub (Oct 28, 2025):

Yeah in headless mode I guess we could show permission modals via clack/prompts

@rekram1-node commented on GitHub (Oct 28, 2025): Yeah in headless mode I guess we could show permission modals via clack/prompts
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2313