---
status: resolved
claimed-by: "019fc06a-9e21-74fd-b16e-4ce8f24f8c3c"
claimed-at: "2026-08-01T23:00:53-04:00"
resolved-at: "2026-08-01T23:07:04-04:00"
parent: "[[094-pi-subagent-result-delivery-spec-task|Pi subagent result delivery specification]]"
blocked-by:
  - "[[099-pi-subagent-child-activity-capture-implementation|Pi subagent child activity capture]]"
tags:
  - ticket/implementation
---

# Pi subagent read-only attach view

## Question

Implement a read-only Pi-like attached child view for inspecting a selected subagent without sending input to it.

## What to build

Selecting a child should open a read-only child-session view as a Pi-native overlay or temporary replacement.
The view should look like a normal Pi session view but omit the text prompt and provide no input channel to the child.
It should render captured child conversation and activity in a Pi-like style, support detach, and support normal scroll up and down controls.
It should not introduce split panes.

## Acceptance criteria

- [x] A command or UI action opens an attached view for a known child id.
- [x] The view renders captured child conversation and activity in Pi-like style.
- [x] The view has no text input path to the child.
- [x] Detach returns to the parent session.
- [x] Scroll up and down works.
- [x] No split-pane layout is introduced.
- [x] Tests or documented manual verification cover attach, detach, and scroll behavior.

## Implementation Notes

Use a custom Pi-native viewer component fed by child RPC or session events.
Do not try to embed a nested `InteractiveMode`.

Implemented on branch `subagent-labels` in commit `7bc0d07 feat(pi): add read-only subagent attach view`.
The `/subagent-attach <id>` command opens a Pi-native overlay backed by the current supervisor status and retained child activity, renders a promptless transcript-style view, supports ↑/↓/PgUp/PgDn scrolling, and detaches with Esc or q.
Verification passed with `nix shell nixpkgs#nodejs_24 nixpkgs#tsx -c tsx --test modules/agents/pi/extensions/subagents/supervisor.test.ts modules/agents/pi/extensions/subagents/runner.test.ts modules/agents/pi/extensions/subagents/ui.test.ts modules/agents/pi/extensions/subagents/config.test.ts` and `nix flake check`.
Review found no blocking findings.
Test-driven development was attempted with independent test-writer subagents, but this harness gave them read-only tools, so they could not author the test first.
