Repository navigation
Sub-agent detail view in /tasks does not allow expanding tool calls #5244
Description
Describe the bug
In the main session timeline, collapsed timeline entries such as $ Shell ... 2 lines… and > Thought for 1s can be expanded either by clicking on them with the mouse or via keyboard shortcuts (Ctrl+O to toggle all timeline entries, Ctrl+T to toggle reasoning).
When viewing a sub-agent's transcript via /tasks (selecting a sub-agent to open its fullscreen detail view), the exact same collapsed entries ($ Shell ... 2 lines…, > Thought for Ns, etc.) are rendered with the trailing … indicator, but clicking on them does nothing and Ctrl+O does not expand tool call outputs. As a result, there is no way to inspect the output of Shell or other tool calls executed by a sub-agent in /tasks.
Affected version
1.0.103
Steps to reproduce the behavior
- Start an interactive
copilotsession in a terminal with mouse support (e.g. Windows Terminal). - Ask Copilot to run a shell command in the main session and then run a sub-agent that executes a shell command:
- Main session command:
echo "Hello from the main session" && uname -a - Sub-agent (
task) command:echo "Hello from the sub-agent" && uname -a
- Main session command:
- In the main session timeline, click on
$ Shell ... 2 lines…or> Thought for 1s— both expand to show full details. - Open
/tasksand select the sub-agent to open its fullscreen transcript view. - Click on
$ Shell ... 2 lines…(or pressCtrl+O). - Observe that
$ Shell ... 2 lines…cannot be expanded by clicking or viaCtrl+O, and individual> Thought for Nsitems cannot be clicked to expand.
Expected behavior
Timeline entries in the /tasks sub-agent detail view ($ Shell ... 2 lines…, > Thought for Ns, and other expandable tool calls) should be interactive and expandable via mouse click and Ctrl+O, matching the main session timeline behavior (and fulfilling the intent of #1322 to inspect sub-agent tool call details).
Additional context
Environment:
- Copilot CLI version:
1.0.103 - OS: Linux
6.18.54.1-microsoft-standard-WSL2(x86_64) - Terminal: Windows Terminal
1.24.12741.0
Root cause from inspecting cli-main.js:
The sub-agent fullscreen detail view reuses the same timeline rendering hook and FullscreenScrollView component as the main session, and even computes and rebases lineOwners for FullscreenScrollView. However, per-entry expansion and click handling are not wired up in the sub-agent detail component:
isTimelineEntryExpandedis hardcoded to a no-op returningfalse(useCallback(() => false, [])) instead of tracking expanded entry IDs.isTimelineEntryClickableandexpansionFingerprintare omitted when calling the timeline rendering hook. BecauseisTimelineEntryClickableisundefined,lineOwnersonly records markdown code blocks (forcopyOnCodeBlockClick) and skips all tool call and reasoning entries.onEntryClickis omitted when renderingFullscreenScrollView, so mouse clicks on non-code-block rows return early.- While
Ctrl+Thappens to toggle all sub-agent reasoning blocks at once (becauseshowReasoningSummariesis passed down from the root component into the sub-agent view asreasoningExpanded),Ctrl+O(expand all timeline) state is not passed down or handled in the sub-agent view.
Activity