Skip to content

Sub-agent detail view in /tasks does not allow expanding tool calls #5244

Open

Description

@HauserV

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

  1. Start an interactive copilot session in a terminal with mouse support (e.g. Windows Terminal).
  2. 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
  3. In the main session timeline, click on $ Shell ... 2 lines… or > Thought for 1s — both expand to show full details.
  4. Open /tasks and select the sub-agent to open its fullscreen transcript view.
  5. Click on $ Shell ... 2 lines… (or press Ctrl+O).
  6. Observe that $ Shell ... 2 lines… cannot be expanded by clicking or via Ctrl+O, and individual > Thought for Ns items 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:

  1. isTimelineEntryExpanded is hardcoded to a no-op returning false (useCallback(() => false, [])) instead of tracking expanded entry IDs.
  2. isTimelineEntryClickable and expansionFingerprint are omitted when calling the timeline rendering hook. Because isTimelineEntryClickable is undefined, lineOwners only records markdown code blocks (for copyOnCodeBlockClick) and skips all tool call and reasoning entries.
  3. onEntryClick is omitted when rendering FullscreenScrollView, so mouse clicks on non-code-block rows return early.
  4. While Ctrl+T happens to toggle all sub-agent reasoning blocks at once (because showReasoningSummaries is passed down from the root component into the sub-agent view as reasoningExpanded), Ctrl+O (expand all timeline) state is not passed down or handled in the sub-agent view.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions