r/opencode • u/desktreme • 1d ago
How do you actually manage your agent orchestration workflow without losing your mind? (Show me your setup)
I am pretty new to agent orchestration and trying to move away from messy, manual chatting into a cleaner workflow. Right now, I feel like I spend more time managing the AI than actually building.
For those of you running multi-agent setups or using different models for different tasks, how do you structure your daily workflow?
- Chat Hygiene: Do you keep one main "standing" chat that you constantly clear/archive, or do you start a fresh session for every single task?
- Task & Memory Management: How do you keep track of everything? Do you keep all context inside the chat/project files, or do you use an external second brain like Obsidian to feed context in and out?
- Model Routing: Do you pre-define your sub-agent models upfront (e.g., hardcoding a cheap/fast model for simple tasks and a heavy model for logic), or do you decide on the fly inside the prompt?
Would love to see how you guys set this up—drop your stack and workflow, screen shot of your side bar chat, etc. below so I can learn what actually works in practice.
I am using Claude code for the orchestrator and various opencode models to do the tasks. All commands started in claude code that commands opencode cli for delegating the tasks.
I am no coder so I dont really know the proper jargon 😂
7
u/Ok-Cut3951 1d ago
Models are hardcoded, but it checks weekly for new releases, changes to pricing, etc.
4
u/alex_aicgs 1d ago edited 1d ago
Multi-agent setup is mostly not optimal. Agents tend to re-read things all over again, so unless it's some highly complex, it's much better to have your one agent do most of it, and to simply have reviewer(s) afterwards. And not spread the models over areas, unless it's like backend vs frontend in which case you shouldn't be doing all at once anyway.
Another reason it's not optimal is reread of uncached input, which is 50x more expensive, regardless API or browser auth. One agent can do it, and subagents can review. That's it. With compactions these days, there are very little downsides, and it's hell of a lot cheaper, and faster.
Another benefit of this is that it's much easier to review for an agent and spot mistakes than it is to build and build well. So just use your best model to build, and a weaker model on higher reasoning to review.
3
u/AIverflow 1d ago
This workflow works across most harnesses and models, intra-harness delegation is simpler and safer than juggling multiple tools. Keep it simple.
Good caching is key to cutting costs in agentic coding, so:
- Don't run multiple agents that all re-read the same context.
- A long session that crashes will lose your momentum and burn tokens to recover.
- Never recall an old session with an expired cache (depends on the model/provider).
- Use handoffs or resume the previous session instead.
After an agentic session, ask your agent to debug it : find pitfall and way improvements : was it too many long tests, too much reviews, agents waiting for nothing, and then enforce rules in the project AGENTS .md
2
u/dangerouscat16 1d ago
I think you probably just need to see someone working in action on youtube. Personally I use t3 code but I realize the author doesnt have the best rep.
fresh sesh for every task but develop dependence on an orchestrator who spawnas subagents as needed
agent.md stays only a pointer to more detail .md files
i do define the sub agents but simply when delegating. "delegate x task to haiku xhigh"
2
u/nuaing11 1d ago edited 1d ago
For me for every big task i ask the orchestrator (good models) a proposal first, either it will research by itself or spawn a subagent for research (researcher agent) (i specify that),
then it give me a proposal, we tune it until i agree, then it will spawn a subagent for the coding works using (builder) deepseek v4.1 flash, it could be 1sub agents or 3,
when its done orchestrator will check that its implemented the way the orchestrator see it fit,
then it spawn another sub agent (verifier) to review the code, if my repo is strict then orchestrator will spawn doc reviewer based on my repo strict requirement then if it meets my requirements rule etc the orchestrator will report to me that it done and summarize it then i test it i confirm and verified,
then i compatc the session
2
u/ThankGodImBipolar 1d ago
I never compact. In my limited and anecdotal experience, compaction eventually leads to drift in agent behavior that is worse than what happens at 500k+ tokens.
I have my agents write bug reports before fixing code, and they commit a dev log with each change. I also have an external wiki, where I store planning, research, some important decisions/ideas, etc.. And, I have LLMs maintain documentation for the project standards and code, within the repo itself, as part of the development process.
You can get a lot of inertia behind behavior like those items after you get the ball rolling. My code is littered with cross references to bugs, wiki pages, decisions, commit hashes that introduced regressions, etc., and while it's all slop to me, it does help LLMs connect the dots/discover the context more efficiently and completely.
I predefine my subagents (partly because I have free OAI credits). Having a model router is an interesting concept to me, and I know that some work pretty well, but naively defining one model is fine for my use cases (and a lot less work). It would be more worth exploring if my goal was a truly autonomous development loop.
2
u/sugarw0000kie 1d ago
Context drift and keeping context small are things to keep in mind, so I view context as untrusted. Every compaction is a game of telephone and things get lost there, and agents running at long context use more tokens and perform worse over time in both speed and code quality. Hallucination rate increases as context goes on. I usually cap my agents at like 256-272k context but may bump up to 400k for the orchestrator.
2: I use repo files, seems to work for me. After creating a list of demands in some spec for the ADR, I have a strong planner write out implementation plans with explicit acceptance criteria, and add them to a registry that is just another .md file that links to planning docs. Plans are marked as ready, blocked, closed. I have planning related skills that agents need to use so they interact with it in a uniform way.
It helps me plan out architecture because I can see clearly to get to step d I still have a/b/c that it depends on, but maybe I can do a+b in parallel, or have other features working on other areas where I wouldn’t be worried about merge conflicts.
1: on chats, I usually keep a chat dedicated to one line of feature development, but may have other chats/worktrees active on that repo so I can build out other areas of the codebase.
3: on model routing, I select subagents as cheaper but still good models. I have luna max (from separate codex sub) as my subagents and luna high for explore. I use stronger models like sol for planing and I change the orchestrator based on the task, deepseek flash is solid for most things, I like minimax 3.1 flash max for frontend, grok 4.7 sometimes I use for review and sec/dependency audit, and glm/gpt terra for harder things. Thats always changing, but models have different strengths so I try to pick ones based on the task and difficulty. Most of the time i switch between deepseek and minimax as orchestrator for backend and frontend.
Caveat with subagents is it’s usually better to let a single strong agent work through a feature line. Where it can be useful to have subagents is when there’s plans that touch distinct areas of code, or on very long implementation trajectories. Strong models will tend to make this call on their own and may launch explore agents but will do most of the building on their own. But if I have something that could take many hours for a strong model to build, like a 15 plan feature line, I know the orchestrator is going to go through several compactions.
In that case I’d rather it hand more of the build work off to subagents to prevent context drift on the orchestrator so I instruct it to use subagents to preserve its context. The subagents will need to re-read and get oriented to the repo so it’s not as efficient. Combination of reduced context drift on delegating orchestrator and the planning docs usually works for me for long builds.
3
u/Senior-Rub-4663 1d ago
Well I'm pretty much in the same boat, not a proper coder myself lol.
Also the amount of value you get from OpenCode Go rn is crazy!! $100 quota on DeepSeek Flash, $500 on GLM and even the $60 Kimi promo. You could probably use Kimi for orchestration itself and save another 20 bucks.
I'd definitely suggest having an independent reviewer though. Agents saying everything is done and everything actually being done are two very different things lmao.
I wasted way too much time trying to build the perfect orchestration setup myself when OpenCode + OpenChamber + Linear MCP and a few scripts were enough for most of it.
Still figuring things out myself but yeah, the biggest improvement for me was getting agents to work independently with proper boundaries and handoffs rather than me manually managing every single chat.
3
u/Fisher_k2 1d ago
Tengo un Workspace personal donde tengo más de 100 agentes y 6 agentes principales que se encargan de orquestar estos subagentes, los subagentes son especialistas en su trabajo (git, Rust, DevOps, testing, etc...) y se invocan dependiendo de la entrada.
Lo normal es que con el prompt ejecute y delegue tareas, pero si quieres algo más especializado, es preferible también diseñar comandos donde especifiques que subagentes quieres invocar para cierto tipo de tareas sin tener que esperar el criterio del orquestador
Te proporciono mi Spam de día, puedes ver mi repositorio para desarrollo de software enfocado en SDD:
https://github.com/Fisherk2/codice-opencode
Ya viene incluido con comandos, skills y agentes, pero tiene la ventaja que lo puedes modificar a tu antojo, no es tan restrictivo como un plugin
Nota: Está diseñado para usarse en OpenCode V2, pero si sabes cómo está estructurado Claude, Codex u otro harness, lo puedes acondicionar.
2
u/povlhp 1d ago
Compact before leaving so have small token count next time around.
Use new for new things in same project.
Remember to have it always write documentation other sessions can read to continue.
1
u/No-Peak8310 1d ago
Si no es para programar mausbot
1
u/[deleted] 1d ago
1
u/weyoun_9th 1d ago
I would keep one orchestrator, start fresh sessions for individual tasks and store important decisions outside the chat. For model routing use cheaper models for routine tasks and stronger ones for complex reasoning. Have you tried mastra?
1
u/vladmvp 22h ago
If part of the mess is several sessions fighting over one machine, Cobalt (cobaltcode.ai) gives each task its own cloud computer, so you start a fresh task per job and each one keeps its own conversation, diff and live preview. You can run Claude Code or OpenCode (with an OpenRouter key) there on your own accounts, and pin up to four live tasks side by side in a grid to keep track of what each agent is doing. There's a free account to try it, and I'm the founder, so happy to help you get started.
1
u/amirfish 17h ago
Model routing on the fly burned me more than it helped. I ended up pre-deciding per task type, cheap and fast for routine work, heavy for anything that touches architecture, because deciding inside the prompt is just another decision I have to make every time.
For memory, external beats in-chat once you're past one session. I keep work as tickets in a queue instead of chat history, worker agents take the next one and run it to done without me prompting each step, that's the model behind CCC, the open source tool I use for this. How many sessions are you actually running at once right now?
Free and open source: getccc.dev · GitHub
1
u/fapmasterr69 10h ago
Check my post for my setup