Skip to content

[BUG] Ctrl+X (agent switcher) is dangerously close to Ctrl+C (quit) — should be remapped to Ctrl+K #23322

Description

@talha7k

Description

The Ctrl+X keybinding for opening the agent/session picker is too close to Ctrl+C, which immediately quits OpenCode and clears the current session. This makes it extremely easy to accidentally close the entire program when you intended to switch agents or view sub-agent tasks — losing your unsent prompt, current context, and interrupting running tasks.

Current behavior

  • Ctrl+X → Opens agent/session picker (chord: Ctrl+X then arrow keys)
  • Ctrl+C → Immediately quits OpenCode, clearing everything with no confirmation

Expected behavior

Remap the agent switcher to a safer keybinding that isn't adjacent to the quit shortcut. Ctrl+K would be a natural choice — it's the standard chord leader key used by many popular TUIs (lazygit, helix, etc.) and has no risk of accidental adjacency with Ctrl+C.

Proposed fix

  • Change agent/session picker from Ctrl+XCtrl+K
  • This follows the convention used by lazygit, helix, and other modern terminal UIs where Ctrl+K is the leader key for navigation actions

Alternative / complementary fix

See related issue: Ctrl+C should ask for confirmation before closing. Both fixes together would eliminate the problem entirely.

OpenCode version

1.4.x

Operating System

macOS

Terminal

Any

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions