r/opencode
•
u/jcheroske
•
10d ago
•
3
I love OpenCode
Working in OC is very satisfying. This is a subagent display I built for v1. I would never have been able to do this in claude.
EDIT: I'm enjoying the response this post is getting. There are the usual miserable, insufferable folks you get on any post, but lots of sincere people asking real questions. It motivates me to share more.
I am very familiar with the frustrations in this agent coding space. You can feel the power of the LLM, but harnessing it to produce good code is really tough. It's easy to get a pile of code, but that code has enormous code debt baked in much of the time. How to get good, maintainable code out is the trick. There is no one right answer. I think what's needed is a structure of repositories, skills, and various deterministic code bits, such as small helper CLIs, hooks, TUI plugins, etc, that allow you to build your workflow in the way that works for you. It's small steps over weeks and months that win the race. My workflow now can lift some heavy things, but it wasn't always that way. When a shortcoming is found in the flow, you need a place to address it. That place might be a skill, the AGENTS.md itself, an agent definition, or something else. The key is having the place, or creating it, so that you can capture the change you want. I like standing on the shoulders of Superpowers, because I think the developer is solid and I think the community around it is keeping the project on track, but I might ditch it at some point if I feel it's not helping anymore.
The first thing I would do is create a repo for holding your global agent configs. I called mine opencode, but you can call it anything. You will want to symlink the folders of this repo into your home directory so that OC sees its files as the global config. You want to be able to work in this repo just like any other repo. In this repo you want to create a folder called config where you'll keep all your global config like skills, your global AGENTS.md, your TUI plugins, etc.
Next, you'll want to create a launcher CLI in this repo that wraps the launch of OpenCode. Mine is oc. This gives you a place to run scripts before OC launches. Next, you're going to create a small CLI that manages the symlinks from this repo to your home directory. It will make sure that your global config and plugins and anything else you come up with are all linked correctly. Then you will put a call to this in your oc launcher.
Here are the global skills that I feel have been the most important. Each has a SKILL.md and a references/ folder with directive files loaded via progressive disclosure. I'm going to paste in Opus's description of each one:
---
directive-quality: This is my skill for writing and maintaining the AI instructions themselves: AGENTS.md, agent prompts, skill packages and directive-bearing config. Its core rule is "use the least context that fully specifies the required behavior." It aims for clear instructions the agent actually follows, not for a lower line count. It routes each job to a focused reference, covering wording and examples, how a skill package is laid out, how skills compose, metadata validation, where an instruction should live, and structured assessments (including sweeps across a whole collection and reviews of the directives in the current conversation). Before any change it checks that the instruction is going in the right place. Afterward it checks that nothing the old text required was lost, and tests the cases where a rule should fire, where it shouldn't, and the exceptions, while stating plainly that passing those checks doesn't guarantee the agent will always comply.
code-quality: This skill shapes the code agents write, and every rule in it comes from one idea: "good code is code that is cheap to change correctly." It's organized around nine pillars. Among them: one logical change should touch one place, invalid states should be impossible to represent, modules should hide more than their interfaces expose, names should tell you what the code does, errors should be handled once where recovery is possible, decisions should be kept apart from side effects, and the codebase's existing conventions win over the agent's own preferences. It also has a self-check table of common LLM coding mistakes, such as reinventing a helper the repo already has, flag sprawl where an enum belongs, catch-log-continue error handling, pass-through wrappers, comments that just restate the code, and tests that mirror the implementation. A matching eight-step review checklist makes the point that a diff can work and still fail review. Testing guidance and architecture/audit guidance sit in separate references that load only when that kind of work starts, and agents load the skill at the start of every role in my workflow, so it applies to coding and review alike.
superpowers-policy: This is my local layer on top of the obra/superpowers (https://github.com/obra/superpowers) plugin. It changes how Superpowers behaves in my setup without forking or patching the upstream package. Its main section names exactly which upstream behaviors I override. TDD still runs red-green-refactor, but test selection follows my own test-design guide. Review checklists only count within the approved scope, so a reviewer can't turn "you could also improve…" into required work. Brainstorming has to restate the intended outcome before it proposes options, and spec and plan locations follow my planning-folder conventions. The rest is a routing table: for each orchestration action it names the one reference that governs it, such as review-loop budgets, picking and continuing workers, sizing tasks, delegating writing, handling unknowns before dependent work, and closing out an effort. Agents load only the reference they need for the action at hand, and a missing reference stops that action instead of letting the agent improvise.
---
Ok, enough Opus spam. I'm going to stop there for now. If folks want to talk about other parts of the workflow, such as agent generation, let me know and I'll add it.
16
u/Pinterest_animals 9d ago
Can't understand what's opencode role here
15
u/jcheroske 9d ago
I love it for two main reasons. First, I can mix claude and codex models very easily. I worked in the claude CLI for a long time, and always struggled to get the same kind of seamless integration I get in OC. Second, OC has the agents definition files feature. I built a generator that reads a large json document and creates agents for my workflow. Then I built TUI plugins to visualize that workflow. I'm really happy with the results I'm getting.
5
u/Pinterest_animals 9d ago
Aha yea i also made a mascot that floats and tells me what's happening when I'm focusing on another window linked yhe agents kind of the same idea as yours
Also try herdr you may like it it can make codex / claude / opencode all work together , i usually set Claude as the boss to monitor Deepseek which saves me quota
1
10
u/UnchartedFr 9d ago
what plugin do you use for the display of your agents ?
0
u/jcheroske 9d ago
It is an OpenCode TUI plugin that I built myself. I built a handful of TUI plugins to display various things. This one is the most complex.
16
u/Total-Management8023 10d ago
wait..... 36 subagents?????????? holy shit i need to get my rookie numbers up. most of the time my models just use 10 at max
12
u/jcheroske 10d ago
Hehe, it's not in parallel. The implementation doc breaks up the tasks into bite-sized chunks and the orchestrator gives them to fresh subagents.
13
u/Bagelsarenakeddonuts 9d ago
everyone does this, but for some reason there is no standard open process for it, which is wild to me.
Sure everyone's workflow is a little different, but I'd adopt someone elses workflow if they had all these kinks worked out.
Are there any open source collaborations to define this sort of workflow, with specific roles and skills? I mean not one random person's take, but an actual group of people collaborating?
5
u/jcheroske 9d ago
Sincere question: isn't that what the various workflow frameworks are doing? There are a bunch of them, each with an active community contributing to their direction and development. For me, I realized I was never going to be happy with something off-the-shelf. I was always going to want some level of customization. I stopped looking for the one-size-fits-all answer and instead rolled a bunch of different parts that will work with whatever framework I decide to go with.
1
u/Bagelsarenakeddonuts 9d ago
What others do you know of? I mean there is BMAD, superpowers, stuff like that. But those are only skills, and dont integrate harnesses, sandboxing, UI, reporting, anything like that.
Everyone is piecing all of this together themselves, when really everyone just wants a reliable package, so they can focus on building what they actually want to build.
Thats what I'm asking really
1
u/jcheroske 9d ago
Ah yes, I see what you are saying now. Yeah, I never hear about the most basic building blocks, like a directive quality skill or a global config repo. That's why I mentioned those. As someone who has been developing a very long time, I'm convinced the most power is found in the simplest structures used well. A well-used skill or symlink can often get you much further than the current hype. I would love to see these basic ideas formalized somewhere.
1
u/Bagelsarenakeddonuts 9d ago
The problem everyone has is that small models aren't quite reliable enough yet for unsupervised productivity, so they work in parallel on smaller tasks.. but then you need to orchestrate them all. And the large models are dangerous, so need sandboxing to be controlled. And then each role needs instructions, and then to maintain appropriate harnesses for each role... etc etc. And you want some to not be able to see the work or thoughts of another for proper review... and prechecks, and staging, and when to batch... You get the idea.
The only way to avoid all of that is to run a single model interactively. That has been solved for a while though. The goal for most people is hands-off productivity, and thats the piecing together piece I was talking about - everyone seems to be simultaneously trying to build this sort of house of cards while the ground shifts underneath as new models and tech come out.
It would be so much easier if everyone just collaborated. But I dont know how that would even happen.
2
u/2thick2fly 8d ago
I can't upvote this enough.
But then again we live in a period that is equivelant to 1960s compiler revolution. We are starting to not write code any more, same as they, in the 60s, slowly stopped writing in assembly
1
u/jcheroske 7d ago
It is a crazy time. I feel my biggest limitation is my in-the-box thinking.
1
u/Salt_Chocolate_990 5d ago
Can you please explain, imagine you build a desktop software which required backend, calculations and visualization on front end complex data with interacting with data. With such workflow you might go so far but what if they built it wrong, or not what you wanted, how you control that? Or which type and size of task you give to such team? I mean it is very overkill for changing button color but for full module there are too many ways which appears as you develop. I just don’t get it
2
u/chaudhary_raj_47 7d ago
The standard will be a repo with 47 YAML files and a README saying "fork this and customize it."
2
u/ha_ku_na 9d ago
This looks promising, could you please share details of your setup spl the orcehstration and managin subagents part.
4
u/jcheroske 9d ago
I used Superpowers as a starting point. I liked certain things about it, but I didn't feel I had enough control of the workflow. I also felt that it was reusing subagents way too much. Their contexts were getting bloated and results were suffering. The first thing I did was create an agent generator that reads a json file. That file contains a complex structure that establishes roles such as implementor, author, reviewer, re-reviewer, code-reviewer, etc. The number of roles has grown over time, but the core are those I just mentioned. It then links those roles to what model and effort should carry out the role. So, impl-low might be haiku-xhigh and impl-med might be sonnet-med. Then a generator runs and builds all the actual agent files that OC uses.
There are many directive files that help create the workflow. One of the biggest upgrades was to tell the orchestrator to break the implementation down into more manageable chunks, and give each chunk to a fresh implementer.
The key for me was working slowly and establishing a good skill framework. If you have a bunch of skills that address core areas of agentic coding, then when a problem arises you will have a clear place to put the fix. Some of my best skills have turned out to be code-quality, directive-quality, superpowers-workflow, and git. They have honed those aspects and have really improved things over time. It's an iterative process.
1
2
u/firest3rm6 9d ago
"I would never be able to do this in claude" ok bud
2
u/jcheroske 9d ago
I just meant that, in claude, Anthropic's models are first-class citizens and all other models require some amount of effort to integrate. Maybe it's better now than it was a few months back when I left it. I really like that OC treats them all the same and they can be mixed and matched so easily. When I was working in claude, I had codex and gemini skills and CLI wrappers that allowed me to call into those models easily, but it was nowhere near as seamless as it is now.
7
u/Any_Confidence2580
9d ago
edited 9d ago
•
You seem butt hurt that anyone would look at this and not immediately see what's wrong with this.
You paid a frontier model to execute a workflow you had already designed. That is the whole problem, and everything below is why.
HarnessTax ran 21 model-harness pairs with the model held fixed. Harness choice moves success by +-2% on SWE-bench Lite and +-5% on Terminal-Bench 2.0. Cost moves 2x between harnesses and up to 5x overall. The Scaffold Effect study found up to 40x in tokens per solved task against 0 to 8 points of pass rate.
Your harness is worth a few points and a multiple on cost. That is the lever. It is not worth a frontier model's rate on top of it, and you have not noticed that the structure you built is the reason you don't need one.
For scale: my blended cost per token is three cents per million. The sticker price on the model is fifteen cents input and sixty cents output; three cents is what you get when the cache hit rate is high and the harness keeps the prefix stable. Against a frontier model that is a five to twenty times difference before you count anything else.
Your Talos upgrade proves the point. Three major versions behind, config format changes, plugins to decommission, failure modes to test, one node at a time with reboots. Every one of those is a lookup with a check attached. That version dropped the in-tree cloud provider. That API version is gone from that manifest. Snapshot etcd before every bump. None of it needs a model that reasons about ambiguity. It needs a list and something that refuses to advance when a check fails.
You keep calling the task complex. It is long. Those are different problems and only one of them costs money.
I run a .NET 10 / Avalonia agent harness: domain-driven, an ACL on every external dependency, a doctrine test suite that enforces its own conventions, LSP integration, chain orchestration with git worktrees and a reconciler step. It has never used anything but GLM-5.3-Flash and DeepSeek V4.1-Flash-1017.
It works because the harness decides and the model executes. A plan becomes a chain. Each step is one session. The session opens with a rendered brief naming its one step, the plan goal, the ledger key, and the completion contract, and nothing else. The model may mark exactly one step done, and only if a verification command exited 0 since its last edit. The gate reads the session's shell ledger, so a green run from an hour ago followed by five edits is refused. The harness starts the next session. The model never picks what runs next.
A model that only has to do the step in front of it does not need to be smart. It needs to not deviate. That is the trick, and it is why the model stops mattering.
Now the part you are being misled about. You wrote a superpowers-policy skill to override upstream behavior. You built a layer to overrule the framework and then credited the framework.
Look at what you are overriding. Superpowers is a SessionStart hook injecting a meta-skill in EXTREMELY_IMPORTANT tags with a 1% rule: if there is even a 1% chance a skill applies, you must invoke it. Plus a red-flags table that pre-rebuts the rationalizations a model might make. Vincent says on the record it is deliberate persuasion engineering, drawing on Cialdini and the Wharton call-me-a-jerk study.
That is a forcing function for models that do not reliably run the procedure. Opus already runs it. Ask it to write the failing test first and it does. It does not need a table of excuses it might make, so the skill arrives as a second specification for something the model already has, and the model reconciles the two in its own idiom. It reads as compliance in the transcript. It does not show up in the diff.
Which is why your workflow needs the expensive model. Your correctness depends on the model's judgment about your instructions. The more capable the model, the better it is at deciding which parts of your methodology to follow. That is the trap, and it gets more expensive every time models improve.
The inverse is why a harness running GLM-5.3-Flash and DeepSeek V4.1-Flash-1017 finds Superpowers naive, and is right. Those are not weak models. They execute a procedure as well as anything you would pay ten times for, which is the point of the whole post. You're making on overpriced Opus read a Superpowers directive, notices it conflicts with something else in the context, and resolves the conflict before it acts. You get the behavior the directive asked for and conclude the directive worked. A model that simply executes does not perform that reconciliation, so a directive that says nothing the harness does not already enforce shows up as work that had to be redone.
On subagents you already diagnosed it and then kept the expensive half. You said Superpowers reused them too much and contexts were bloating. A fresh subagent is a fresh context, and a fresh context is a full-price context. On DeepSeek's card a cache hit is 50x cheaper than a miss. Superpowers 6.4's own release notes put inline execution at roughly 2x faster and half the cost of subagent-driven development with frontier models. You are running the configuration its author moved off, at a frontier premium.
What would have made your upgrade cheap: write the checklist. One line per version bump, one line per API removal, one line per plugin to decommission. Put a gate on each line. Let a three-cent model work the list. Let kubectl get nodes and an etcd health check decide whether it worked. None of that is a model's opinion, which is exactly why it does not need an expensive model to produce it.
You're the one that said the answer is repositories and skills and deterministic bits. But you're not following your own advice. You're depending on Opus to fix a mess for you on every turn. If you just want a pat on the back for a screenshot and a "woopie!" for using Kubernetes, you already got it.
5
u/Any_Confidence2580 9d ago
I suspect you're going to have a fit about this, so in superpowers fashion:
EXTREMELY_IMPORTANT
STOP USING ANTHROPIC
STOP DEPENDING ON "ORCHESTRATORS"
STOP PRETENDING EVERYTHING YOU DO IS "COMPLEX"1
u/NewAnxiety2478 9d ago
Do people really write such long responses or is it the usual trolling bots.
1
u/Any_Confidence2580 9d ago
Yes, they do. If you want short responses, see: https://www.reddit.com/r/opencode/comments/1xpylm3/comment/19saplq49jx5w/
Can't make everyone happy.
1
1
1
1
u/neuralnomad 8d ago
Good lord… between this and the original post, I’m even more put off by the extreme agentic paradigm (I don’t like workflow, it’s too narrow) In one case, there’s so much effort keeping a SOTA model from doing what it’s designed to do so powerfully, and in the other, so much effort in accounting for so many contingencies so that, a model dutifully performs with high fidelity at the cost of the work it took to constrain it such that it had little other choice. Credit to the skill of those mentioned—way above my non-professional level, but I’m not seeing the payoff. Where is the return in all this human investment in concrete work-centric terms, not insulated benchmarks?
1
u/ReasonableLetter8427 8d ago
I like your ideas here and thanks for actually explaining the idea behind a harness.
I’m curious if this is fine for Lean code you think
1
u/TheMythicSorcerer 9d ago
is this 2 plans or API billing?
3
u/jcheroske 9d ago
Two plans
2
u/Inevitable_Act_321 9d ago
But anthropic would ban you
3
u/jcheroske 9d ago
Look at https://github.com/rynfar/meridian. And don't forget to enable the OpenCode plugin.
2
2
u/TheMythicSorcerer 9d ago
no not anymore. There's a mode now that basically proxies your requests to claude code, but OP is using a plugin that does the same thing.
2
u/Error-Frequent 9d ago
Do the opencode comes built-in now with feature to use claude subscription usage!?
1
1
u/Flaky_Pay_2367 9d ago
seems nice, could you share this workflow via github?
1
u/jcheroske 9d ago
I can't, I'm sorry. I just don't want the headache of managing an open source project. I will try and share some of the config. My recommendation in this era of agentic coding, is to establish a basic structure that allows you to grow your workflow bit by bit. I will edit the post to try and describe what I feel are the most important pieces of this.
1
u/FaerunAtanvar 9d ago
So you don't want to share you orchestration and TUI setup?
1
u/jcheroske 9d ago
I am happy to share it, but it is more about the approach rather than sharing a codebase. I may open source a couple of the skills and the agent generator, but I don't want to create maintenance overhead for myself.
1
u/Gumbi_Digital 8d ago
Have you tried T3 Code and agent orchestration?
1
u/jcheroske 8d ago
No. What is it and what do you like about it?
1
u/Gumbi_Digital 8d ago
It’s a a coding app that allows you to have multiple frontier/local APIs and can call other agents for work.
I was using OpenChamber (OpenCode wrapper) before, and switched to T3 for my major workflows now.
1
u/JondeMLG 8d ago
You can do this in opencode too
1
u/Commercial_Island389 8d ago
With your subscriptions? The ability to use your Claude and Codex subs in T3 is what makes it a game changer over things like the Cursor or Opencode which I believe just pool API credits and ultimately get significantly less use than the fully subsidized subscriptions.
1
u/jcheroske 7d ago
I'm using subs for both in opencode. Codex direct but soon to be via meridian. Anth via meridian.
1
u/Commercial_Island389 7d ago
So you can use can connect your regular Claude and Codex Subscriptions and pull solely from your regular subscription usage. Idrk how open code works but I never thought that was possible and it’s what made me never consider it.
1
u/jcheroske 7d ago
Yes, exactly. I started using Meridian because there is no way, just using OC, to use Claude via a plan. Meridian is really sweet. So sweet in fact that I'm about to enable it as my Codex gateway as well.
1
u/plmtr 5d ago
Is this what you're referring to? https://github.com/rynfar/meridian
Is this more interoperable than using ACP?
I'm currently using Ohmyopencode Slim and I know connecting Claude via ACP results in it missing the context of the rest of the agents, which is not desirable.
1
u/jcheroske 4d ago
Yes, that is it. I don't notice any issues. I could be missing something for sure, but everything seems to be working great.
1
2
1
u/2thick2fly 8d ago
My most interesting observation is that there seem to be virtually zero posts in Claude or Codex subreddits that discuss so detailed harnesses. Everyone seems to just vibing it without having any process around it - at least nothing more than the coding agent apps provide, which I think are definitely not enough.
1
u/jcheroske 8d ago
Yes, totally agree. Everyone seems to be looking for the config that will give them the one shot. I still think you need to know what makes code and an architecture good.
1
u/Slow-Set-2856 7d ago
Why sonnet over opus?
1
u/jcheroske 7d ago
A couple of reasons. First, it seems like Anthropic is positioning Sonnet as the implementation workhorse. It is scoring higher on some benchmarks than Opus, but those benchmarks are more work oriented and less reasoning focused I think. Opus is obv a total beast, but I think Sonnet as implementer is defensible. Second, I like using multiple models, as you get different takes on problems and different points of view. They are both from the same company, so there's less difference between them than some other combinations, but it provides some value I think.
1
u/snseeee 7d ago
Good! Matt pocock repo is top on software engineering as well, check it out and maybe you can improve your workflow as well it brings decades of experience in software engineering and computer science engineering
2
u/jcheroske 7d ago
I've been meaning to take a deeper look at that repo. A lot of people are really loving it. What do you think are its strengths, esp over Superpower, but just in general as well?
1
u/ChipmunkDbuffy 6d ago
What about refusal my claude max always refuses should I try it
1
u/jcheroske 6d ago
I don't understand what you're asking. What is claude refusing to do?
1
u/ChipmunkDbuffy 6d ago
I am building automation application and claude refuses to build do you think Opencode better options for it
1
u/jcheroske 6d ago
I can't say. Do you have a workflow setup? Are you writing a spec and then creating a build plan from it?
1
2
u/MisterTHP 9d ago
me too i love opencode i am creating my own irc client v3 with it and it's awesome
1
u/Much-Researcher6135 9d ago
I really do think opencode is great, it's so clean to work with. Is it easy to extend?
1
1
u/Emergency-Celery6344 9d ago
hi I really need this can you please share, I am on limited plan so can't vibe my way
1
1
1
1
1
u/Junglistsss 5d ago edited 5d ago
The guy talks about bad code written by AI (granted code written by people are often multitude worse) but then used AI to generate his post lol.
Also technically, yes its not allowed to use Anthropic subscription this way. Currently not enforced.
1
u/MysteriousCoconut31 9d ago
I'm not reading all of that, but happy for you. Try to be more concise next time. Help me understand your point faster.
1
-1
u/Any_Confidence2580 10d ago
This is a horribly inefficient and expensive run.
4
u/jcheroske 10d ago
I'm getting incredible results, but ok.
1
u/mqfr98j4 7d ago
I'm in your camp. I have 78 agents and get incredible -- and consistent -- results. I will sacrifice some level of efficiency for quality, which is what I think some others are arguing (and I'll admit to being ever so slightly less efficient, but when the output is higher quality, it's worth the trade-off)
1
u/jcheroske 7d ago
You said it perfectly. There are people in this thread and all over going on and on about how cheap models are all you need for implementation. I've seen dumb models get confused so many times on basic tasks. I don't want dumb model code. I want real code. I teach my models to write maintainable code. Like you said, a bit more cost upfront for way better results and much less debt. It's no contest.
0
u/Any_Confidence2580 9d ago
What was the cost, task and line change?
6
u/jcheroske 9d ago
Oh, the task is a complete upgrade of a Talos Kubernetes cluster. It is currently in the process of updating Ansible scripts and testing various parts of the proposed upgrade pipeline. Then it will walk the cluster through multiple version bumps, one node at a time, managing reboots and insuring everything is running normally. It's a large spec document that was converted into an implementation plan that will probably take a day to run.
-1
u/Any_Confidence2580 9d ago
This is a horribly inefficient and expensive run.
2
u/Fight_4ever 9d ago
I fed it to gemini and it said that a single AI agent should be able to manage that task. So I guess you are right.
1
u/jcheroske 9d ago
If the upgrade was a simple version bump, it would have been no problem. But I hadn't touched the cluster for over a year. It was behind three major versions I think. There had been config format changes. There were plugins to decommission. There were many failure modes to test. The subagents did a banger job at working through a complex task list. Maybe one session could do it. I find this workflow to be much more robust most of the time.
1
u/Any_Confidence2580 9d ago edited 9d ago
One mid level cheap model can write and do each of those tasks. The old idea of a "orchestrator" is misguided and only there to make up for terrible web stack interfaces. And needing anthropic for anything at all.... the use case for those prices don't exist. Period.
People seem to think everything they do is so complicated they must immediately jump for the most expensive thing and waste the compute. Doesn't matter how you dress it up, you're describing is still just basic text generation.
3
u/TGodPanda 9d ago
i think to prevent getting unnecessary hate, you should provide proof or give reasons for why you think this. you're welcome :)
1
u/Pinterest_animals 9d ago
Notice how you always hate and get downvoted everywhere lol
-3
u/Any_Confidence2580 9d ago
Hey buddy, the 16 year old with a reading and writing definincy. You doing ok?
2
0
41
u/ComfortableJacket283 10d ago
how much does it cost you in api credits lol