[Feature] Custom command to cycle between child sessions #3563

Open
opened 2026-02-16 17:40:40 -05:00 by yindo · 1 comment
Owner

Originally created by @fglogan on GitHub (Dec 15, 2025).

Summary

Add a custom slash command (e.g., /cs or /child) to cycle through child sessions, providing an alternative to the keybind approach which can conflict with terminal emulators.

Problem

The current keybinds for cycling child sessions (<leader>+right / <leader>+left) don't work reliably across all terminal emulators. Some terminals capture arrow key combinations before OpenCode receives them.

Proposed Solution

Add a slash command that provides child session navigation:

/cs           # Show list of child sessions with picker
/cs next      # Cycle to next child session
/cs prev      # Cycle to previous child session  
/cs 1         # Jump to child session 1
/cs list      # List all child sessions

Alternatively, extend the existing /session command:

/session children     # List child sessions
/session child next   # Cycle next
/session child 2      # Jump to specific child

Use Case

When using the Task tool, multiple child sessions are spawned. Users need a reliable way to:

  1. See what child sessions exist
  2. Switch between them to monitor progress
  3. Review results from completed child tasks

Additional Context

This would complement the existing keybind approach and provide a fallback for users whose terminal setups conflict with the default keybinds.

Originally created by @fglogan on GitHub (Dec 15, 2025). ## Summary Add a custom slash command (e.g., `/cs` or `/child`) to cycle through child sessions, providing an alternative to the keybind approach which can conflict with terminal emulators. ## Problem The current keybinds for cycling child sessions (`<leader>+right` / `<leader>+left`) don't work reliably across all terminal emulators. Some terminals capture arrow key combinations before OpenCode receives them. ## Proposed Solution Add a slash command that provides child session navigation: ``` /cs # Show list of child sessions with picker /cs next # Cycle to next child session /cs prev # Cycle to previous child session /cs 1 # Jump to child session 1 /cs list # List all child sessions ``` Alternatively, extend the existing `/session` command: ``` /session children # List child sessions /session child next # Cycle next /session child 2 # Jump to specific child ``` ## Use Case When using the Task tool, multiple child sessions are spawned. Users need a reliable way to: 1. See what child sessions exist 2. Switch between them to monitor progress 3. Review results from completed child tasks ## Additional Context This would complement the existing keybind approach and provide a fallback for users whose terminal setups conflict with the default keybinds.
Author
Owner

@github-actions[bot] commented on GitHub (Dec 15, 2025):

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

  • #3291: [FEATURE]: Navigation to parent session from child/subagent sessions - discusses session navigation challenges
  • #2555: Cannot navigate to child sessions - reports keybind issues (ctrl+left/right don't work in iTerm/Terminal)
  • #2816: navigate child sessions shortcut conflicts with macOS spaces/desktops - discusses keybind conflicts with OS shortcuts
  • #4432: [FEATURE]: "session_child_return_to_parent" in keybinds - requests configurable keybinds for session navigation

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

For keybind-related issues, please also check our pinned keybinds documentation: #4997

@github-actions[bot] commented on GitHub (Dec 15, 2025): This issue might be a duplicate of existing issues. Please check: - #3291: [FEATURE]: Navigation to parent session from child/subagent sessions - discusses session navigation challenges - #2555: Cannot navigate to child sessions - reports keybind issues (ctrl+left/right don't work in iTerm/Terminal) - #2816: navigate child sessions shortcut conflicts with macOS spaces/desktops - discusses keybind conflicts with OS shortcuts - #4432: [FEATURE]: "session_child_return_to_parent" in keybinds - requests configurable keybinds for session navigation Feel free to ignore if none of these address your specific case. For keybind-related issues, please also check our pinned keybinds documentation: #4997
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3563