Hacker News new | ask | show | jobs
by theshrike79 311 days ago
In my experience the best use for subagents is saving context.

Example: you need to review some code to see if it has proper test coverage.

If you use the "main" context, it'll waste tokens on reading the codebase and running tests to see coverage results.

But if you launch an agent (a subprocess pretty much), it can use a "disposable" context to do that and only return with the relevant data - which bits of the code need more tests.

Now you can either use the main context to implement the tests or if you're feeling really fancy launch another sub-agent to do it.