Files
ai-artifacts/projects/dotfiles/100-pi-subagent-read-only-attach-view-implementation.md

2.4 KiB

status, claimed-by, claimed-at, resolved-at, parent, blocked-by, tags
status claimed-by claimed-at resolved-at parent blocked-by tags
resolved 019fc06a-9e21-74fd-b16e-4ce8f24f8c3c 2026-08-01T23:00:53-04:00 2026-08-01T23:07:04-04:00 094-pi-subagent-result-delivery-spec-task
099-pi-subagent-child-activity-capture-implementation
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

  • A command or UI action opens an attached view for a known child id.
  • The view renders captured child conversation and activity in Pi-like style.
  • The view has no text input path to the child.
  • Detach returns to the parent session.
  • Scroll up and down works.
  • No split-pane layout is introduced.
  • 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.