r/opencodeCLI • • 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 Upvotes

12 comments sorted by

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

1

u/neoneye2 19d ago

I had Claude Fable 5.2 analyze your repo. I study memory systems.
https://neoneye.github.io/agent-memory-atlas/systems/qualitylayer/

1

u/m-ritter 19d ago

Thanks, that is a really thorough read. Tying each lesson to its files and letting it lose trust once Git shows those files changed is exactly the idea, a memory should not outlive the code it describes. The point that the agent can restore something a person retired is a fair catch, I'll look into it. Of the mechanisms in your rubric, which one do you see making the biggest difference in practice?

1

u/neoneye2 19d ago

Some focuses on businesses shared between employees, others focus on personal data, others on privacy using only local models, others focus on GDPR and things being deletable, others on having an interactive UI where the memories can be inspected. Some are a memory system library, others are a full harness with memory.

Implementing everything, and one may get a memory system that is broad and shallow.

IMO depending on what your focus is, do what makes best sense to you.

1

u/m-ritter 19d ago

Makes sense. My focus is narrow on purpose: coding agents working in a team repo, so memory lives next to the code and gets reviewed like code. Thanks for putting it in the atlas, I'll go through the other systems there and see what I can learn from them.

1

u/neoneye2 19d ago

Yw. DM me when you want a rerun of you code.

1

u/m-ritter 19d ago

Thanks. If I want another look I will ask right here, so the notes stay with the thread.

1

u/neoneye2 19d ago

That is fine.

1

u/Praistaly 17d ago

do you find the review agent ever misses subtle drift if the acceptance checks aren't super strict?

1

u/m-ritter 17d ago

Yes, it can. A review agent is only as good as the checks it gets. If a check says "handles errors properly", subtle drift slips right through. That's why I spend my time on the plan before the agent starts and rewrite vague points into something you can observe. Loose checks are the thing I watch most.

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=N line, 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.