Subagents for the win
When delegating work, sometimes it makes sense to compartmentalize it and spawn subagents to complete separate tasks. There’s no hard rule for when it makes sense to stay with a single agent and when it makes sense to orchestrate into multiple agents, but observing how the context window is consumed while you work with a single agent can be a useful indicator; for example, once it goes beyond 50%, ask if it makes sense to delegate to subagents.
There are multiple caveats to keep in mind when doing this. For example, you don’t want multiple agents working in parallel in the same git worktree. You may want to split tasks in ways that don’t interface with each other.
One workflow where I use subagents is a routine that reviews and comments on active PRs: one subagent per PR, while an orchestrator feeds subagents and receives the review results to post comments on the PRs.
I will describe exactly how this workflow is implemented in an upcoming article.