r/opencode • • 1d ago

Should i use subagents by default?

I have mostly worked with one main agent doing everything in the same context and it does fill up the 1M context window very fast.

Does the orchestrator approach work better where the agent spawns a subagent even for one scoped task?

And is this slower or faster?

13 Upvotes

14 comments sorted by

12

u/Slow-Secretary4262 1d ago

you should definitely experiment with it because experience varies a lot.

personally i tried and it doesnt work for me, i do 1 thing at the time in a new session for each task with a frontier model and i get the best result in the least time and with comparable cost than having a frontier model orchestrate cheap workers

5

u/cornyfoothold_81 1d ago

Subagents prob miss subtle details during handoffs anyway. Carrying a quick notes file into a fresh session keeps things moving smooth

8

u/burtcopaint 1d ago

Dude, it's the best.
Have subagents probe, scout etc to not fill the context window.
Have them return things in bullet points in order to do so, have them specify what they could and could not verify etc...

Think about it. It's really neat

3

u/Mission-Repair4564 1d ago

For one scoped task, with clear information (already scouted) then subagents will harm more than good.
You can always let the main agent decide whether it wants subagents or not, with some clear instructions.
Here's mine:
- Single agent: Known files, <= 3 targeted lookups, or routine single-track edits
- Subagents: Small/single-surface work (<= 10–15 files) needing 4+ unknown-file traces, 2+ subsystem scouts, or large log digs
- /swarm (antigravity swarming feature): 3+ independent slices with non-overlapping file ownership (or parallel authors + verifiers); never for read-only synthesis, shared files, or <= 2 files

3

u/Ariquitaun 1d ago

The approach is slower, the results are better and you'll possibly save a ton in cost if you properly set yourself up so that cheap and free models do a lot of the monkeywork.

Attention in a model is finite, regardless of the context size. The more you cram into the context, the worse for the model to discern what's important and relevant next.

3

u/for4f 1d ago

yeah i run orchestrator by default now. main model decides when to spin up a subagent, and the workers run cheap stuff like flash metered so it barely costs anything. for one small scoped thing though a single agent is honestly faster, subagents add overhead re-reading the repo and all that. so basically let the main agent decide, don't force it either way

2

u/fapmasterr69 1d ago

Yes, definitely take that approach but select your models carefully. Using an expensive model will backfire and eat up your usage allowance very fast. Currently I am only using hy4 flash and deepseek 4.1 flash. I was using GLM 5.3 when they announced $500 limit, then I also tried GLM 5.3 flash, I keep rotating my models to my convenience.

1

u/sugarw0000kie 1d ago

Subagents can create a lot of overhead for the orchestrator and they will need to re-read their bit of the repo to get oriented, then the orchestrator may need to backtrack and fix things

So like if you run it all through one strong model it will handle it better on its own usually. if the subagents are cheap models being led by a model that's good at orchestrating it can be cheaper to do it that way.

For really long tasks i like to use subagents because it's usually cheaper helps to preserve the orchestrators context.

Usually not great to run agents up to their max context if you can avoid it

1

u/twbluenaxela 1d ago

I use opus as my orchestrater and it does a great job. I've been able to stretch my sub to use it the entire week. I wouldn't be able to do that if I just had Opus plow through by itself.

1

u/gibbon119 1d ago

This is how I define my subagents in Orca:

1 does probing and reports back findings.
1 makes the changes.
1 reviews the changes.
1 reviews the changes for security alerts and vulnerability findings.

1

u/Pacoboyd 1d ago

I use GLM 5.3 as my guide, Qwen 3.8 FN as a worker, and GLM 5.3 Flash as a workerplus (tougher problems) and it's been working great. I actually had GLM 5.3 design the whole stack and when I need to tweak it I just have the agent update itself. Saved me a ton of cash because sub agents are doing the heavy lifting. My guide verifies everything and redispatches if it finds and issue. If it fails twice (rarely seen) it just takes care of the issue itself.

On top of that it, monitors for context getting close to 250k and won't redispatch to the same agent if it thinks it will go over that limit. Same limit applies for itself, if the Guide chat is nearing 250k it will save what it needs to memory, and handoff the project to a new top level agent. Keeps them from hitting the dummy spot when context gets to large.

1

u/s-i-e-v-e 1d ago

You have to be smart about it. The main agent needs to know enough about the project to guide the subagents. Otherwise, it is the blind leading the blind.

Anything that fills up the context with useless or ephemeral stuff should probably be done by a subagent.

1

u/oyren-ai 1d ago

per the opencode docs a subagent runs with fresh context in its own child session, and it uses its configured model or inherits the parent one. so a scouting subagent on a cheap model keeps the main window small and the bill down.

1

u/Unlucky_Village_7656 1d ago

Not by default no, spawning a subagent for one scoped task mostly just adds latency and you lose the context handoff