opencode icon indicating copy to clipboard operation
opencode copied to clipboard

`ctrl+x up` keyboard shortcuts do not work

Open skerit opened this issue 1 month ago • 4 comments

Description

I clicked a subagent session and was transported into the session. Very cool.

But now I'm stuck.

I see at the top:

Subagent session Parent ctrl+x up Prev ctrl+x left Next ctrl+x right

None of these ctrl+x+arrow buttons do anything

I'm unable to exit. The only thing I can do is ctrl+c, which immediately exits the entire application.

Plugins

No response

OpenCode version

1.1.12

Steps to reproduce

  1. Use a subagent / task
  2. Click the subagent/task
  3. Get stuck inside the subagent/task

Screenshot and/or share link

No response

Operating System

Linux

Terminal

Wezterm

skerit avatar Jan 10 '26 19:01 skerit

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

  • #5706: ctrl+x left shortcut for switching to sub agent session is not present in ctrl+p commands menu
  • #4180: ctrl-left/right doesn't navigate between subagents since 1.0 TUI - TUI captures left and right?
  • #4292: [feedback] make left / right navigation for subagents more clear
  • #2390: Switching to a child session doesn't send subsequent messages to that session but to the parent one
  • #4422: Primary agent responds in subagent view; delegated subagent views become inaccessible
  • #3291: [FEATURE]: Navigation to parent session from child/subagent sessions
  • #6491: Session does not automatically return to parent after subagent execution

There's also a mention of keybind documentation in #4997 which may have relevant information about the ctrl+x navigation shortcuts.

Feel free to ignore if none of these address your specific case.

github-actions[bot] avatar Jan 10 '26 19:01 github-actions[bot]

None of these seem to be duplicates of my issue. The second one #4180 came close, but that was only for ctrl + left/right, and due to a MacOS already having a binding for that. I do not have a binding on my Linux machine for ctrl + x + up/left/right

skerit avatar Jan 10 '26 19:01 skerit

I was confused about this but I figured you have to press ctrl +x first and THAN up separately.

frasza avatar Jan 10 '26 22:01 frasza

Well I'll be damned Even with the explanation on the keybinds documentation page did I not figure that out:

Leader key

OpenCode uses a leader key for most keybinds. This avoids conflicts in your terminal.

By default, ctrl+x is the leader key and most actions require you to first press the leader key and then the shortcut. For example, to start a new session you first press ctrl+x and then press n.

If it had been worded like "first press the leader key, release, and then the shortcut" I might have figured it out. Or made it more obvious that some kind of special shortcut mode is being enabled.

In the "normal" non-subagent mode I might have figured it out, since I see that when you press ctrl+x there the text input area gets greyed out, but there is no such visual hint in the subagent screen.

skerit avatar Jan 11 '26 12:01 skerit

Yes, similar to Vim shortcuts, you can try to resolve confusion with a simple comment like [ctrl x]

mingshi2333 avatar Jan 12 '26 03:01 mingshi2333

I did search and found this issue so I'm not alone. and my mind become blank when I saw @frasza message. LMAO

ethaizone avatar Jan 12 '26 07:01 ethaizone

I made the header things clickable too now, so if u get stuck u can just click "Parent" and itll nav u back

ill look how others do it so we can update docs to be more clear, any recs or prs to fix confusion also welcome

rekram1-node avatar Jan 12 '26 21:01 rekram1-node