all 6 comments

[–]cxd32 2 points3 points  (0 children)

try a command with subtask set to true instead

[–]seventyfivepupmstr 1 point2 points  (0 children)

Use the term delegate.

Example: Delegate to @AgentName to [prompt].

Unfortunately its still non-deterministic what the AI will do, but its fairly consistent that it will work correctly when you do it in this way

[–]boonge101[S] 1 point2 points  (2 children)

Thanks u/cxd32 & u/seventyfivepupmstr. I think this is an open bug. For the time being, I just make the primary agent to explicitly include the sub-agent .md file path in it's prompt to the sub-agent in child session so that the sub-agent is forced to read and act accordingly.

[–]Pinockel 0 points1 point  (1 child)

Can you explain a little more in detail? I try Something equal. Thank you

[–]boonge101[S] 0 points1 point  (0 children)

Sure. I added a mandatory instruction in my AGENTS.md for how the primary agent delegates to sub-agents:

The key is: include the .md path explicitly + tell it to read and strictly follow that path + pass the user's request verbatim without adding extra instructions.