upvote
> Using sub-agents means that they can't use that cache

They can, when they're forked off the main session instead of spawned from scratch.

reply
I admit I'm not a heavy user of subagents but isn't one of the standard use cases for subagents to run a single command, take the output, summarize it for the main agent and pass it up instead of polluting the context?

When cargo fails to build and creates a massive amount of compile errors, you're better off having this preprocess step.

reply
I also don't like subagents.

I usually have my main agent write a wrapper command around things like that as it hits them. The wrapper only surfaces the important info, writes the full log to a file, and the agent gets some instructions on using sed and the like to navigate the output.

It seems to work reasonably well.

reply
>When cargo fails to build and creates a massive amount of compile errors, you're better off having this preprocess step.

Claude already greps and tails every output by itself, a sub-agent would do the same.

reply