opencode icon indicating copy to clipboard operation
opencode copied to clipboard

feat(tui): add /subagents command to view subagent tree for current session

Open adam2am opened this issue 3 weeks ago • 0 comments

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

adam2am avatar Dec 28 '25 11:12 adam2am