Feature Request: Ability to View and Navigate Sub-agent Task Sessions
Title: Feature Request: Ability to View and Navigate Sub-agent Task Sessions
Is your feature request related to a problem? Please describe.
The sub-agent feature is a powerful way to delegate complex, specialized tasks while keeping the main conversation log clean and focused. However, this encapsulation also makes the sub-agent's process opaque. When a sub-agent is invoked, its internal "thought process," tool usage, and intermediate steps are hidden from the user.
This "black box" behavior makes it difficult to:
- Debug failures: If a sub-agent fails or produces an unexpected result, there is no way to inspect its workflow to understand what went wrong.
- Verify correctness: Users cannot see the specific commands an agent ran or the data it reviewed, forcing them to trust the final output without verification.
- Provide feedback: It's hard to steer a sub-agent or correct its course if its actions are not visible.
Describe the solution you'd like
I propose creating a navigable parent-child relationship between the main session and sub-agent sessions. This would allow a user to "drill down" into a sub-agent's detailed transcript and then return to the main conversation.
Key features:
- Viewable Sub-agent Transcripts: When a sub-agent task is initiated or completed, the UI should provide an interactive element (e.g., a clickable link or a hotkey) to view the full transcript of that specific task.
- Dedicated Sub-agent View: Activating this element would switch the user's view from the main conversation to a read-only log of the sub-agent's session. This view would show the full interaction, including:
- The initial prompt from the main agent.
- The sub-agent's thinking/planning steps.
- All tool calls and their results.
- The final response returned to the main agent.
- Clear Navigation:
- The sub-agent view should have a clear header indicating which task is being viewed (e.g.,
--- Viewing Sub-agent Log: code-reviewer (task-123) ---). - A simple, intuitive mechanism to return to the parent session should be provided, such as pressing the
Esckey,q, or a/backcommand.
Example Workflow:
> /use the code-reviewer subagent on my last commit
// The UI indicates a sub-agent is running and provides a way to view its log
✻ [Task: code-reviewer] Reviewing changes... (ID: task-123) [View Log]
...
// After completion, the links might be updated
✓ [Task: code-reviewer] Completed. The agent found 3 minor issues. [View Summary] [View Log]
If the user activates [View Log]:
--- Viewing Sub-agent Log: code-reviewer (task-123) ---
(Press 'q' to return to the main session)
> User: Review the last commit.
> Assistant: Okay, I will start by running `git diff HEAD~1` to see the changes.
> [Tool Call: Bash] git diff HEAD~1
> [Tool Result] ... (diff output) ...
> Assistant: I see changes in `auth.js`. I will now read the file to check for style violations...
> [Tool Call: Read] auth.js
... (the rest of the sub-agent's detailed transcript) ...
--- End of Log ---
Pressing q would return the user to the main conversation view.
Describe alternatives you've considered
- Dumping the full log into the main chat: This would defeat the purpose of sub-agents, which is to keep the main conversation uncluttered.
- Verbose mode: A global verbose mode might show too much information from all tools, not just the specific sub-agent task a user is interested in. A targeted drill-down is more user-friendly.
Additional context
This feature would significantly improve the transparency, debuggability, and trustworthiness of sub-agents. It preserves the clean UI of the main chat while providing power users and developers with the detailed view they need for complex tasks. It aligns with the tool's terminal-centric nature by providing a modal, navigable "view" similar to tools like less or vim.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗