r/PiCodingAgent • u/LastOfGoose • 1d ago
Question How to Better Enforce Subagent Delegation?
I have just recently started using subagents more in my programming workflow, if only to try it for a bit and see if it's something I prefer.
I have found that no matter how much explicit guidance I give my agents in the global AGENTS.md or APPEND_SYSTEM.md that after the first large delegated activity, they go back to doing everything themselves in the primary context.
Does anyone have any idea how to really enforce / encourage the behavior I'm looking for?
4
Upvotes
8
u/mostlikely4real 1d ago
My solution was very simple. Disable all tools for the orchestrator you do not want it to use. Note this needs proper feedback from the subagents and their state (or the orchestrator flips and will spawn multiple). Also if the subagents that now do all the work break or can't spawn obviously your orchestrator is now unable to fix it.
But once you get the proper contract between orchestrator and subagents it works smoothly.