Repository navigation
fix(pi): name workflow child rows by their step key, not only the agent - #26909
Conversation
pi-subagents never sends a description, so every child row fell back to the agent name and two children on one agent read the same. Workflow children do carry workflowKey, a bounded slug, so use it as the label. Fixes stablyai#26908
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe Pi subagent roster source now uses a nonblank Priority: ⬇️ Low Severity of issue fixed: Low Merge Risk: ⚪ Minimal · up to For the verified pi-subagents v0.76.1 workflow path, step keys reach the sidebar labels as intended. No merge-blocking issue is established; the repository does not pin the external runtime version. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ELI5
When Pi runs a workflow with two helpers of the same kind, for example two reviewers, the sidebar shows both as "reviewer". This PR shows the name each helper was started under, such as "review-code" and "review-rollout", so you can tell them apart.
What Changed
Before: every child row under a Pi pane showed the pi-subagents agent name. Siblings that used the same agent had identical rows.
After: a workflow child's row shows its workflow step key. A child started outside a workflow still shows the agent name, and OMP children still show their task description.
Mechanism: the status extension that Orca installs into Pi now copies
workflowKeyfromsubagent:async-startedinto the child'sdescription, but only when the event has nodescriptionof its own. The sidebar already names a row bydescriptionbeforeagentType(src/shared/agent-child-row-model.ts), so no renderer change is needed.Why
pi-subagents redacts task prompts, so #23201 used the agent name as the only safe label. pi-subagents also sends
workflowKeyon every workflow child. That key is the one the script passed toruns.run/runs.all, and pi-subagents only accepts 1–128 letters, numbers,.,_or-, so it is a short label and never prompt text. Using it fixes the duplicate rows without touching prompts or the renderer.Alternatives considered:
agent · key. That makes rows longer for a case the key alone already covers, and it would need a renderer change shared with Claude and Codex rows.description. That needs an upstream change for data that is already on the event.Linked Issue
Fixes #26908
Visual Proof
The row text changes. Before/after screenshots will follow in a comment.
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
New test in
src/main/pi/agent-status-extension-async-subagents.test.ts: a workflow starts tworeviewerchildren keyedreview-codeandreview-rollout, and the posted roster carries each key as the child'sdescription. It fails without the fix and passes with it.The event shape matches real pi-subagents 0.76.1 runs: each workflow child's
status.jsoncarriesworkflowKeyandparentWorkflowRunId.Ran on Linux:
vitest run src/main/pi/(31 files, 446 tests),pnpm tc,oxlintandoxfmton the changed files, andpnpm run check:code-quality:changedagainstupstream/main. Fullpnpm lintandpnpm buildwere not run locally.AI Disclosure
Claude Opus 5.5 (
claude-opus-5-5, xhigh thinking) in the Pi coding agent investigated the bug, wrote the change and the test, and drafted this description.Review
workflowKeyand OMP children (which senddescription) keep their current labels.descriptionstill wins over the key.Agent skill upstream boundary
Notes
Security, cross-platform support, remote SSH, mobile, backwards compatibility and performance are covered under Review. Older pi-subagents versions that don't send
workflowKeykeep the agent name.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)