feat(tui): inspect and steer focused subagent sessions - #238
Conversation
There was a problem hiding this comment.
Three previously reported issues remain: closing a streaming child can invalidate its retained inspection history when a late update arrives (P2); pasting a media path while focused on a child can mutate the hidden root composer (P2); and focused-child rendering uses root terminal hyperlink metadata, allowing incorrect link destinations (P3).
|
Addressed all three review findings in this push: late updates after transcript sealing no longer invalidate retained history; focused-child terminal paste routes as text before attachment classification; native hyperlink metadata and obscuring state now come from the visible transcript. Added close-while-streaming, event-level paste (steerable/read-only), and backend-output hyperlink regressions. Validation: 13 transcript tests, the real close-streaming regression, 4 focused-child tests, formatting, and diff checks pass. |
|
Addressed the follow-up link-suppression finding: child views render no completion overlays, so their native links no longer inherit root-style completion suppression. Extended the backend regression with a retained /model child draft. All four focused-child tests, formatting, and diff checks pass. |
Summary
Add keyboard and mouse navigation from the root subagent roster into a focused child transcript, with capability-gated text steering and an explicit return to the main session. The root session continues running and retains its roster, transcript, draft, and scroll position.
Impact
Use Ctrl+G to focus the roster, arrows and Enter to open a child, or click its row. Escape or Back to main returns without interrupting either session. Inspection and steering support direct children; descendants remain visible in the root roster but show an unsupported inspection notice.
Technical details
Load only the focused transcript
The owning runtime records child updates to an ephemeral disk spool. The TUI loads only the selected child's history and follows new updates through ordered cursor reads, releasing the transcript when focus changes. Replay and live reads share a cursor, and session, generation, focus-epoch, and cursor checks reject stale responses. Small drafts and scroll state survive focus changes.
Spool history survives child re-prompts but is not a durable session archive. Inherited or resumed history can be partial. Oversized records and unsupported content produce visible omission notices; queue or storage failures are isolated from execution and reported explicitly.
Restricted, generation-safe steering
The child composer accepts text only for active direct children advertising compatible steering. Requests use the existing steering path with registry and actor generation checks; they never fall back to root prompts or new child turns. Root-only commands remain unavailable in child focus mode.