Skip to content

Conversation

@rgodha24
Copy link
Contributor

Screen.Recording.2025-12-18.at.2.05.59.PM.mov

Copilot AI review requested due to automatic review settings December 18, 2025 21:07
@rgodha24 rgodha24 changed the title tui: go to parent keybind for subagents feat(tui): go to parent keybind for subagents Dec 18, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a "go to parent session" keybind feature for navigating from subagent sessions back to their parent session. The default keybind is set to <leader>up, complementing the existing left/right navigation for cycling through child sessions.

  • Adds session_parent keybind configuration with default value <leader>up
  • Implements navigation command to jump to parent session when invoked from a subagent
  • Displays the new keybind hint in the session header for subagent sessions

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
packages/sdk/js/src/v2/gen/types.gen.ts Adds TypeScript type definition for the new session_parent keybind configuration option
packages/opencode/src/config/config.ts Defines the config schema for session_parent keybind with default value <leader>up
packages/opencode/src/cli/cmd/tui/routes/session/index.tsx Implements the command handler that navigates to the parent session when parentID exists
packages/opencode/src/cli/cmd/tui/routes/session/header.tsx Adds UI element displaying the parent session keybind hint in subagent session headers

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@zenyr
Copy link
Contributor

zenyr commented Dec 22, 2025

Hey! I was struggling with the same issue, having to cycle through 20+ child sessions to get back to the parent was quite frustrating. I had OpenCode search for existing issues/PRs, and it found two open PRs addressing this:

I really like the focused approach here! Both PRs implement the same session_parent keybind, but this one keeps the scope minimal (+32/-2 vs +131/-6). The sidebar UI in #4865 is nice, but could be added separately if needed later.

This PR pairs really well with the recently added feature to click on subagent sessions to navigate to them. Having a simple session_child_return_to_parent keybind to jump back completes the workflow perfectly.

Also appreciate that this aligns with the original proposal in:

Would love to see either one merged!

@rekram1-node
Copy link
Collaborator

/review

@github-actions
Copy link
Contributor

lgtm

@rekram1-node rekram1-node merged commit 25f1643 into sst:dev Dec 22, 2025
4 checks passed
iljod pushed a commit to iljod/opencode that referenced this pull request Dec 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants