r/opencodeCLI • u/albasili • 20d ago
agents management and constraints
I've been using opencode with an agent setup based on the OpenAgentControl (https://github.com/darrenhinde/OpenAgentsControl) and tweaked for IC design verification.
I've been running with this setup for the past few months and I'm in general happy about it, with constant tweaks to the agents definitions, the standards, the guidelines etc.
In the past 6 weeks the amount of parallel work has skyrocketed and I went from 2/3 sessions running in their own separate folders/worktrees to more than a dozen active sessions. I've enabled notifications to stop constantly checking all the agents, but the real bottleneck is not how quickly I can feed the agents with information and prompts, but rather the review of the work provided.
We use Gitlab for development and we have "issues" to track our progress, with boards etc. All good and dandy, but I've noticed that often the amount of work involved in reviewing and approving all the merge requests, the issues comments, the newly created issues that track gaps that weren't closed during the session, starts to be unbearable to the point that I'm not 100% how much is truly done and how much is just pushed into the future.
So my real question here is not really about a "plugin" or a "tool" to manage the agents, but rather a workflow that allows the team to be able to move a step higher and instead of judging all the lower level details, focuses on fundamental principles instead, like architecture, features completeness, possible gaps, overlooked corner cases.
I've started to ask to provide a report of the campaign at the end of it, with diagrams and pictures to explain what has been done and achieved, but would that be sufficient? How to make sure the report is not just hallucinating and deviating from the actual implementation?
The speed I've been working has truly been a x20 at least, but I also have the feeling that my grasp on the features and the code has wined and I'm feeling overwhelmed by the overall amount of reading that I need to digest, let alone reading the actual code.
I'm using simple-english to contain the verbosity ever since I switched to Opus 5.5, but a merge request description alone can be 2 pages long with gazillions of details, the documentation has exploded, the comment to code ratio has ballooned and there's little I can do to read and digest all of that.
How do you tame the beast? Any tricks, suggestions.
I realize this is not opencode related, but there might be tools and tricks that opencode users are using to address some of the issues above.
2
u/m-ritter 20d ago
The step up you describe happens when the review moves to the plan. If you and the agent agree on the architecture and the acceptance checks before any code exists, and that plan lives as a file in the repo, you only need to read the plan and the final PR. A separate agent that did not write the code then checks the diff against that plan and flags gaps or drift, so you stop relying on the agent's own report of what it did. I built QualityLayer for this and it runs on OpenCode: https://github.com/maxritter/qualitylayer
2
u/ayashiemon 20d ago
I have an agent setup that I think might give you a different angle on this issue: https://gist.github.com/yuriha-chan/d3015c9168ab3c0e094e84674d11f3f2
It incorporates a Counsel agent that questions Lead's assumptions, looks for overlooked issues, and helps figure out what actually needs my attention. Sometimes I even reject Lead's questions because I can't understand what it's asking, or I don't want to decipher its self-indulgent terminology, and tell Lead to go back to Counsel and come up with a better question.
I also occasionally browse the actual codebase, looking for code smells or things that seem odd, and ask the agent to explain them. It actually works, because... well I just believe in my eye-grep ability.
It certainly is a better experience than trying to audit every change, or debating abstract architectural plans and ADRs.
And well, part of why I'm posting this is that I've been tinkering with this setup for a while, but the gist has barely had an audience. Feels a bit of a pity to leave something I think is useful sitting there unseen. Maybe you'll find something worth borrowing from it, or have a completely different take on the problem.
1
u/rwtd5150 18d ago
I can see you're already running an agent-control setup (OpenAgentsControl), so this may overlap with what you have, but it might solve the review-trust part of your problem differently, and the docs are there if you want to check: turnstile (mine: https://github.com/edseabolt/turnstile).
The "is the report hallucinating?" question has a mechanical answer: don't let the agent grade its own report. Two changes did it for me.
First, make claims checkable when they're made. My test-runner agent has to end its run with a
GATE: PASS tests=Nline, or the next stage doesn't get dispatched. The plugin enforcing this checks that marker against the test runs it journaled. If some other agent claims the tests passed, the plugin records that text as suppressed and ignores it. So the "everything is done" in your campaign report isn't something you take on faith: the done-claims were captured from the agent that ran the tests, when it ran them.Second, read the end-of-campaign report against that captured evidence, not against your own attention. An agent summarizing its own campaign drifts, usually by smoothing rather than lying. But if every gate decision (plan approved, tests passed, reviewer verdict) was journaled when it happened, the report is a map of the evidence instead of a substitute for it.
On stepping up to fundamentals: the gates handle the "did it actually pass" layer mechanically, but the "is the design right" layer stays yours. What they buy you is the ability to skip reading the low-level work, because its claims were checked when they were made, and that frees the time for the architectural review. (The separate-reviewer-agents approach mentioned in this thread works too, but it's still agents grading agents, so the failure mode moves rather than goes away.)
It's OpenCode v2, MIT, no runtime dependencies. Gate decisions are journaled per-session, so parallel sessions don't step on each other.