You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When Pi delegates work to the planner or another subagent, PiNative renders the parent subagent tool call using the generic fallback:
Working through the next step
That line can remain unchanged for the duration of a long planning or review task. It does not tell the user that a planner is running or show the useful work steps visible in Pi's own subagent presentation.
This is not caused by chat Markdown formatting. The fallback predates that work; the newer use of specialized agents makes the limitation more visible.
Why this happens
PiNative currently recognizes only a small set of top-level tool names when producing activity summaries (read, write, edit, bash, and update_changelog). subagent therefore falls through to the generic status.
Pi's RPC stream already exposes richer live data on tool_execution_update.partialResult.details. For a subagent invocation, those details can include:
Mode: single, parallel, or chain
Agent name and delegated task
Per-agent running/completed/failed state
Child assistant messages and tool calls
Step numbers for chained work
Usage and model metadata
PiNative currently extracts only text from partialResult.content and discards the structured details payload.
Desired experience
A delegated planning task should immediately identify what is happening and then show concise, safe progress as the child agent works. Example summaries:
Planning the requested change
Planner is reviewing the project structure
Planner is reading PiConversationView.swift
Planner is searching for activity-group handling
Planner completed the implementation plan
Parallel and chained delegation should communicate aggregate and per-task state without flooding the transcript, for example:
1/3 delegated reviews complete, 2 running
Step 2 of 3: reviewing the proposed implementation
Requirements
PiNative should recognize subagent tool calls and identify the delegated agent or mode instead of showing the generic fallback.
While a subagent is running, PiNative should consume structured RPC progress updates and surface recent, meaningful child work steps.
Single, parallel, and chained subagent invocations should have clear running, completed, and failed states.
Nested progress summaries should preserve source event ordering and update from authoritative RPC events, without polling or timing-based correctness.
User-facing summaries should not expose raw prompts, tool arguments, command output, hidden reasoning, secrets, or other technical payloads by default.
Progress should remain concise and visually consistent with existing activity groups rather than reproducing a terminal transcript.
Captured nested summaries should survive navigation and relaunch through PiNative's transcript persistence when they were observed live.
Hydration should degrade gracefully when a persisted Pi session contains only the final subagent result and no structured historical details.
Existing non-subagent activity summaries should continue to behave as they do today.
Implementation considerations
Likely work includes:
Introduce a typed, Codable representation for nested/delegated activity, with backward-compatible decoding for existing cached transcripts.
Parse tool_execution_update.partialResult.details.results[].messages for subagent calls.
Derive privacy-safe summaries from child tool-call names and selected safe fields, reusing the existing summary vocabulary where appropriate.
Update the matching parent tool by toolCallId as cumulative partial results arrive.
Model single, parallel, and chain progress without losing event order.
Render a compact recent-step view with polished completed and failure states.
Preserve a sensible generic fallback for unknown or malformed subagent payloads and for session hydration without details.
The subagent implementation emits cumulative partial results, so PiNative can replace the stored nested state on each update rather than attempting to infer deltas.
Test expectations
Unit tests for parsing representative single, parallel, and chained partialResult.details payloads.
Unit tests for malformed/missing details and backward-compatible transcript decoding.
UI coverage for a deterministic delegated-work fixture showing multiple visible progress steps and terminal state.
Live verification with a real planner/subagent invocation, because fixture-only coverage cannot prove the current Pi extension payload remains compatible.
Non-goals
Rendering hidden model reasoning.
Showing raw child tool arguments or output in the default transcript.
Problem
When Pi delegates work to the planner or another subagent, PiNative renders the parent
subagenttool call using the generic fallback:That line can remain unchanged for the duration of a long planning or review task. It does not tell the user that a planner is running or show the useful work steps visible in Pi's own subagent presentation.
This is not caused by chat Markdown formatting. The fallback predates that work; the newer use of specialized agents makes the limitation more visible.
Why this happens
PiNative currently recognizes only a small set of top-level tool names when producing activity summaries (
read,write,edit,bash, andupdate_changelog).subagenttherefore falls through to the generic status.Pi's RPC stream already exposes richer live data on
tool_execution_update.partialResult.details. For a subagent invocation, those details can include:PiNative currently extracts only text from
partialResult.contentand discards the structureddetailspayload.Desired experience
A delegated planning task should immediately identify what is happening and then show concise, safe progress as the child agent works. Example summaries:
PiConversationView.swiftParallel and chained delegation should communicate aggregate and per-task state without flooding the transcript, for example:
Requirements
subagenttool calls and identify the delegated agent or mode instead of showing the generic fallback.Implementation considerations
Likely work includes:
tool_execution_update.partialResult.details.results[].messagesforsubagentcalls.toolCallIdas cumulative partial results arrive.The subagent implementation emits cumulative partial results, so PiNative can replace the stored nested state on each update rather than attempting to infer deltas.
Test expectations
partialResult.detailspayloads.Non-goals