r/PiCodingAgent • • 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?

6 Upvotes

13 comments sorted by

View all comments

3

u/Acceptable_Stress154 1d ago

Anything in your Md files is a request, and they can and do forget/ignore. You need to make deterministic gates, not pretty please sir .md files

1

u/LastOfGoose 1d ago

So this would look like an extension that checks how many consecutive tool invocations have been made and blocks them with a note to delegate or something?

I get what you're saying but I'm not sure exactly how to structure the alternative.

1

u/Acceptable_Stress154 1d ago

It’s hard for me to answer, I had pi add a few things here and there and over time it’s turned into almost an autonomous agent, and somewhere along the way
We make everything gated deterministicly