Repository navigation
[Feature]: Runtime Permission Mode Toggle (like Claude Code's Shift+Tab) #7928
Description
Feature Request: Runtime Permission Mode Toggle
Problem
Currently, OpenCode defaults to auto-edit mode where all file edits execute immediately without confirmation. This is too aggressive for many workflows and can lead to unintended changes.
While permissions can be configured statically in opencode.json, there is no way to toggle between permission modes at runtime without switching agents.
Claude Code solves this elegantly with Shift+Tab cycling through three modes:
- Normal - Edits require confirmation
- Plan - Read-only analysis, no edits allowed
- Auto - Edits execute automatically
Proposed Solution
Add a dedicated keybind (suggest Shift+Tab or configurable) that cycles through permission modes within the current agent:
[Normal Mode] ──Shift+Tab──▶ [Plan Mode] ──Shift+Tab──▶ [Auto Mode]
▲ │
└──────────────────────Shift+Tab───────────────────────┘
Mode behaviors:
| Mode | edit | write | bash |
|---|---|---|---|
| Normal | ask | ask | ask (except safe commands) |
| Plan | deny | deny | deny (read-only commands allowed) |
| Auto | allow | allow | allow |
Current Workaround
Users can create multiple agents with different permissions and use Tab to switch between them:
{
"agent": {
"build": {
"permission": { "edit": "ask" }
}
}
}<!-- ~/.config/opencode/agent/auto.md -->
---
permission:
edit: allow
write: allow
---Problems with this workaround:
- Agents have separate conversation contexts
- Switching agents feels like starting over
- Not intuitive for new users expecting Claude Code behavior
- Requires manual configuration
Why This Matters
- Safety by Default - New users should not accidentally overwrite files
- Workflow Flexibility - Sometimes you want to review changes, sometimes you trust the AI
- User Expectations - Claude Code has set the standard for this interaction pattern
- Reduced Anxiety - Users can confidently explore knowing they have control
Implementation Suggestion
- Add a session-level permission override state
- Add keybind
permission_mode_cycle(default:shift+tabif not conflicting) - Show current mode in status bar or input area (e.g.,
[Normal],[Plan],[Auto]) - Persist mode preference per session or globally
Visual Indicator
Show the current mode near the input area:
┌─────────────────────────────────────────┐
│ [Normal] │ Type your message... │
└─────────────────────────────────────────┘
Or in a status line:
build │ claude-sonnet │ Normal Mode
Configuration
Allow users to customize the default mode:
{
"permission": {
"defaultMode": "normal" // "normal" | "plan" | "auto"
}
}Related
- Current workaround uses agent switching via
Tab/Shift+Tab(agent_cycle keybinds) - Permission system:
packages/opencode/src/permission/ - Claude Code reference: https://docs.anthropic.com/en/docs/claude-code
Note
This is different from the existing agent-switching mechanism. The goal is to change permission behavior within the same agent/session without losing conversation context.
Activity
github-actions commentedon Jan 12, 2026
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
For keybind-related issues, please also check our pinned keybinds documentation: #4997
mguttmann commentedon Jan 17, 2026
Partial implementation available in PR #9073!
Implemented:
Not implemented in this PR:
The keybind cycling between Normal/Plan/Auto modes could be added as a follow-up enhancement. This PR focuses on the core YOLO mode functionality.
imehtamav commentedon Feb 12, 2026
Agents do retain conversation history within a session -- the problem is that we cannot switch agents when prompted for permission like we can with Claude Code.
Perhaps the issue is that agents and permissions are too tightly coupled, as it does make sense that you cannot switch agents while another agent is still running, but it also makes sense that you would want to switch permission modes while an agent is running.
github-actions commentedon Apr 14, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.
HomuraTokido commentedon Jun 18, 2026
Still no way to toggle permissions at runtime in Desktop/TUI. The /yolo\ slash command PRs (#27851, #27855, #9073, #11833) all died. Either a slash command or a Shift+Tab style mode toggle would solve this. Is this on the roadmap?