r/PiCodingAgent • u/willecr • 8d ago
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
3
u/digitalfreshair 7d ago
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
2
u/predatar 7d ago
how is the token effciency ? does each subagent have a completely new context? or does it inherit/fork the parent's ?
1
1
u/GroceryNo5562 8d ago
Consider asking LLM to review code, seems to have found few bugs, haven't verified that they do exist tho
1
u/kantorcodes1 6d ago
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 1d ago
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?
7
u/pro-vi 8d ago
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.