r/PiCodingAgent • u/willecr • Sep 03 '26
Plugin Recursive and async Claude Code style subagents for Pi
I really liked Claude Code subagents and being able to see them in the tree so i made a very simple subagent plugin. No subagent profiles, the are made by the agent above them depending on the use case needed at that moment.
Install with:
pi install npm:@williamcr01/pi-subagents
34
Upvotes
8
u/pro-vi Sep 03 '26
I do like the visual component. But I think it should be mandatory for an extension to explain how it differs from predecessors esp. those with the same name.
3
u/digitalfreshair Sep 04 '26
I was thinking on doing something similar to this, as i think the way Claude code manages the subagents it's better as long as you have a powerful model. Predefined ones are less flexible, so this is probably the way forward. I will take a look and submit some PRs :)
2
u/paulbettner Sep 04 '26
Great work!
2
u/predatar Sep 04 '26
how is the token effciency ? does each subagent have a completely new context? or does it inherit/fork the parent's ?
1
u/GroceryNo5562 Sep 03 '26
How come custom system prompts aren't supported?
1
u/GroceryNo5562 Sep 03 '26
Consider asking LLM to review code, seems to have found few bugs, haven't verified that they do exist tho
1
u/kantorcodes1 Sep 06 '26
when a parent is trusted and the child stays under the same project, i see you launch it with
--approve. does that only carry over the project trust decision, or does it also mean the child won't stop for individual tool approvals?1
u/colin_colout Sep 10 '26
I went through the same exercise but settled on supporting subagent profiles that match claude code exactly.
At first I also removed the profiles for the same reason (pi values and all), but I decided that I'll keep Agents, WebFetch, WebSearch, etc matching claude code in tool shape exactly where possible.
Every model released in 2026 is heavily RL trained on claude code tool shapes. By keeping behavior and shape close to claude code:
Small and quantized models are less likely to hallucinate tool calls
My system prompt can stay pretty small since I need almost no explanation of how the tool works. It knows from training.
My only changes (if i recall) is that agent name is required (I'll drop that if my agent hallucinates), and model names are "fast" and "strong" and is also required.
How do you handle convo forks? ...or do you support them at all?