Skip to content

Conversation

@adam2am
Copy link

@adam2am adam2am commented Dec 28, 2025

Summary

Adds a /subagents command that displays a hierarchical tree of all subagents spawned during the current session, making it easy to track parallel agent execution.

  • Tree view: Shows parent → child relationships of all spawned subagents from root
  • Current session highlight: Marks your active position in the tree
  • Configurable keybind: session_subagents (default: none)

Changes

File Description
src/cli/cmd/tui/component/dialog-subagent-list.tsx Dialog component for subagent tree
src/cli/cmd/tui/util/subagent-tree.ts Tree building utilities
src/cli/cmd/tui/app.tsx Register keybind handler
src/config/config.ts Add session_subagents keybind
test/cli/subagent-tree.test.ts 35 unit tests

Testing

bun test test/cli/subagent-tree.test.ts — all 35 tests pass

- Add recursive tree view showing all nested subagents from root

- Highlight current session in tree for navigation context

- Add keybind (default: none, configurable via session_subagents)

- Include 35 unit tests for tree logic
- Add root session as first option in subagent tree dialog
- Enables bidirectional navigation (can now return to main from nested subagent)
- Shift subagent depths +1 to visually indent under root
- Mark root with '(main)' description for clarity
@adam2am
Copy link
Author

adam2am commented Dec 28, 2025

Decided to include the root (main session) at the top of the tree. Yes, you can navigate back to the root via leader+UP or switch sessions with leader>+L, but having to leave the subagent view just to return to the parent felt clunky. Now it's one click, same subagents view

- Add ctrl+d for delete (with confirmation on second press)
- Add ctrl+r for rename (opens session rename dialog)
- Match session list UX for consistency
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.

1 participant