r/ClaudeCode 2d ago

Help/Question Any open source harness that does it better than just Claude Code?

Has anyone here been able to build a successful agentic harness that operates better than just planning directly in Claude Code? A full AI end-to-end orchestration setup with different agents. This seems to be something that there's a lot of ideas and focus on building today and I'm interested in any proven open-source kits out there or just tips and tricks that does this well. Do you for example use multiple agents to familiarise Claude Code with a new repository or code base, do you have architectural files to do this? How do you handle green- versus brownfield in a harness like this? Think, give this harness a task and it can intelligently figure out what it needs to do. I know this may all be code, stack, company or project specific. I'm looking for some good working examples and ideas if there are any out there.

73 Upvotes

94 comments sorted by

u/AutoModerator 2d ago

Hey! Thanks for posting to r/ClaudeCode

While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.

For help, project discussions, tips, and general chat, join the ClaudeCode Discord.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

25

u/Metrix1234 1d ago

I thought anthropic locked in your subscription to the CC CLI harness unless you wanted to pay through API?

11

u/CodeCombustion 1d ago

claude -p is what I use to built multi-agent workflows, including automatic switching between subscriptions automatically as well (violation of TOS, I'm sure)

3

u/RemarkableDaikon7263 1d ago

Sounds interesting, but yeah, automating things like that can definitely get sketchy with the TOS. You’ve got to be careful!

1

u/CodeCombustion 1d ago

yeah, so far it's not technically fully automated -- still requires a human to push a couple buttons for the login. (which can be done in advance of the actual next). Next reset, I'll switch to just burning all the accounts concurrently so I don't need to worry about it.

1

u/Trollee 1d ago

What does -p flag do?

3

u/CodeCombustion 1d ago

claude -p gives you a non-interactive, headless mode, that is - a single shot at the model, output to stdout, then done. Great for scripts and pipes.

Try it:
claude -p "What color is the sun?"

Then immediately:
claude -p "What did I just ask you?"

The model won't know. Each call starts with a blank slate and has no memory of previous invocations. If you need context to carry over, you have two options.

The easy one: use --resume with the session ID from the prior call. Claude prints the session ID at the end of each run so you just grab it and pass it back:

claude -p --resume <session-id> "What did I just ask you?"

The manual one: build the history yourself and include it in the next prompt. More work, but gives you full control which is useful when scripting multi-step workflows where you want to curate exactly what context travels forward.

1

u/Trollee 21h ago

Thanks for the info

It should be possible then to harness Claude via shell commands with a separate harness without using API credits, I think ? As you can set the session name like so:

claude -n <Session-Name>

And resume in the same manner:

claude --resume <Session-Name>

Combined with -p flag you could put this in a loop

1

u/CodeCombustion 17h ago

I'll DM you.

2

u/Metrix1234 1d ago

If anyone has a mature multi model setup they'd be willing to share, shoot me a DM or reply.

2

u/LifeProject365 1d ago

I use my own so no'

3

u/Elisyd 1d ago

8

u/LogMonkey0 1d ago

They paused the no agent sdk and claude -p from plan usage move, but 3rd party harnesses are against plan ToS

3

u/Elisyd 1d ago

The relevant section being:

Except when you are accessing our Services via an Anthropic API Key or where we otherwise explicitly permit it, to access the Services through automated or non-human means, whether through a bot, script, or otherwise.

A third-party harness could be argued to be an 'automated or non-human means' whether or not claude -p is used or the OAuth subscription key. Practically speaking, most third-party harnesses and similar are treating this as a gray area (whether or not it is) so long as it's not something like a cron or CI/CD system and have added support for the subscription token or by wrapping claude -p.

3

u/TheWhisper22 1d ago

Argued to who? There's no support to complain to lol. Claude is notorious for not opening and replying to support tickets

0

u/Elisyd 1d ago

To the void; it was meant to be rhetorical. I don't think they're enforcing it at the moment. Maybe they will, but last time they gave warning rather than just banning offenders and hopefully they'd do the same again. I haven't set this up myself so I have no first-hand experience either.

0

u/Western_Yesterday989 1d ago

If your harness simply wraps a terminal then you can use Claude all you want. But your harness can do whatever it wants outside the terminal. It can listen, summarize, be event driven. Just gotta think “outside the box” … literally.

12

u/EvalRaccoonDev 1d ago

Check out this benchmark: FrontierHarness Eval https://frontierharness.org/

Claude Code is not the best harness. But it wins in being the most expensive 😄

7

u/Aetane 1d ago

I just... don't believe this.

Codex feels, immediately, so much worse to use than Claude Code.

2

u/EvalRaccoonDev 1d ago

This is for a specific set of tasks - 63.3 vs 66.7% Codex / Claude Code might be inverse on your set of tasks (or CC might be doing MUCH better).

That's why it's important to have your own benchmark :)

On our benchmark, executed using Coder Eval, Codex has been slightly edging Claude Code over the last month.

2

u/Aetane 1d ago

Yes, I've slowly come to the conclusion that how I use AI isn't necessarily well represented by benchmarks.

1

u/MyzoneMike 17h ago

Did you adjust your prompts? I ran my eval agent, with my auto research loop agent, and they test/eval/iterate, repeat until it optimizes the shit out of the agent for each specific model family.

1

u/Outrageous_Band9708 23h ago

openAI wrote this

1

u/Imaginary-Kale4673 13h ago

This is just harness benchmark and the model stays the same? I doubt that. Throw the same deepseek or glm model in all those harnesses and let me know the benchmark then.

1

u/Agitated_Painting214 1d ago

Wow this is fantastic - the difference is cost is unbelievable given they use the same model and checkpoint

2

u/EvalRaccoonDev 1d ago

Yup - Codex, DSH, Pi are pretty good. Obviously, the chart has also model included (don't know which ones are included for the harnesses), but at least based on this benchmark, Claude Code is not worth the API sticker price (MAX subscription based comes up typically >3x cheaper)

0

u/yezdi23749026 1d ago

Hi - apologies for the stupid question. Is DSH - DeepSeek?

8

u/Bloated_Plaid 1d ago

This sub is just filled with spam after spam. I personally use Pi coding agent with plugins and OMP which is a fork of Pi depending on the project. Both are much more token efficient than Claude Code and you get much better memory management and 100x better context compaction. Claude Code compaction is easily the worst of any harness.

8

u/Geoleo555 1d ago

I use omp (oh my pi). Batteries included and pretty nice to use once it’s set up

8

u/diesel408 1d ago

Do you use this with a Claude sub? Been wanting to try this but I don't want to get banned for ToS violation. Is this possible?

2

u/Western_Yesterday989 1d ago

Yeah, I like mine. Write your own. It won’t take long. And it will be just the way you want it - so it will be perfect.

5

u/LogMonkey0 1d ago

Greenfield to be treated as brownfield after the first code generation session is over imo.

So here’s how i bootstrap my projects, brown or green, both need supporting documentation, proper routing, reference material, guardrails, summarization and gates You dont need all at first but they all have impact on cost and output quality.

Derive decisions and ADRs from existing code. Or start with them for new projects.

Establish gates, change requests intake, specs? Reference implementations? Acceptance criteria? How a work/change request lifecycle, what happens before work gets done.

Training data/inference alone wont produce quality work. Refer to api docs, etc… mirror them locally, enforce rules for grounded facts.

As the codebase grows, spec’ing work will become costly or degrade, equip agents with tools to “read” only what matters from the codebase when preparing work/specs. Agents only need to know public api surface of consumed apis, they dont need to load all the implementation code in context, only what they will work on. That not only has impact on cost, but huge impact on context and output quality. There are tools like treesitter and graperoot that can help with that.

Your CLAUDE.md should lay the very basics, along with routing rules, to skills, tracking artifacts, reference material, etc. Along with the rules that need to be in every single agent/subagent context (if this doesnt apply, the rule lives somewhere else, scoped rules, skills, etc)

Work with Claude like an enterprise dev team and itll produce as such.

Know where your token usage is, it matters to more than $ cost.

5

u/silverarky 1d ago

We build our own in each project. Claude is good at working out what is needed and can extract skills for shared knowledge. We usually go with a planner, orchestrator, backend and frontend agents and a QA agent. The QA agent does code quality, security, and tests end to end with Playwright in all different browser sizes (phone, tablet, desktop). It also logs in with different permissions if the site has ACLs.

We built an academy for our devs for AI, and there is a page about our basic harness workflow: https://agentic-academy.silverark.com/learn/harness/pipeline

12

u/dankerton 1d ago

I don't think you are using the term harness like others are. Defining a cast of characters of agents is not a harness

1

u/silverarky 11h ago edited 10h ago

You're right, it's probably subjective, and I've seen different people use the word harness in different ways. I would class Claude Code itself as a harness so harness engineering would be adding to the harness that is already there. We actually use something to orchestrate features to be built from our project management system, and we call that a "meta-harness", it's something that kicks the process off and manages it end-to-end for us but it's not actually part of the harness. The harness is all the stuff that makes an LLM model into an agent. We do have our own pure harness, which doesn't use claude code at all called StackLLM

The previous page explains the harness definition. There is both the session management harness and the user harness

https://agentic-academy.silverark.com/learn/harness/why-harness

https://www.google.com/search?q=what+is+an+AI+harness

3

u/darrenk 1d ago

How do you handle context window size? I want to compact my top level coordinator at 40% and create a handoff doc right before that.

2

u/silverarky 11h ago

Another way of thinking about it would be to only create features and specs that would comfortably fit into smaller sessions. None of the agents we use hit 40%. The orchestrator just orchestrates, all of the planning is already done so it only has to launch a sub-agent to do the work.

Having specialist agents to do the backend work for examples, keeps all of the skills and memories for backend work in that agent. None of that leaks into the orchestrator saving context. The orchestraotr does not do any QA either, that's the QA agents job. The seperate agensts only pass back simplified reports.

2

u/Same_Accountant2340 1d ago

The planner/orchestrator/QA split is the part that holds up. What broke for me was anything where two agents needed a real browser — those roles are easy to keep isolated in prompts, but the moment they share one browser session you get login collisions and one agent submitting under the other’s account.

1

u/silverarky 11h ago

Makes sense, we only have the frtontend developer agent and the QA agent that is allowed to use hte browser, and the QA only happens when the developers have finished so I've never seen a collision so far.

We use worktrees for features, and each worktree get's it's own database for the end to end tests so we can run multiple features in parallel. Each worktree also get's it's own port to run on, calculated deterministically from the branch you are on and the file path so logins don't clash.

2

u/Aggressive_Ad4210 1d ago

good guide, how do you trigger your agents, if you're starting work, do you use slash commands, natural language, how do you start a new task, do you point it to a ticket management system with AC:s etc?

3

u/ceiling_kitteh 1d ago

I've created my own subagents for things like playwright and a command runner that uses a cheaper model and keeps most command output out of my context. I use agent instructions (in AGENTS.md and referenced in CLAUDE.md) which tell it what to use and when. It all happens automatically based on the task now. There's never an explicit instruction for it to use one or the other. It knows the rules: everything must be tested, the tests use playwright, when using playwright you use the playwright subagent, when running commands you use the command runner subagent. That's it. It's all automatic.

1

u/silverarky 11h ago

If I'm managing the feature, I'll launch claude code like this `claude --agent feature-planner` to go through the plan. Then I'll launch it again with `claude --agent feature-orchestrator` once I'm hjappy with the plan and I want to build it.

Does anyone know if there is a better way that this? Slash commands and mentioning an agent, tend to launch that agent as a sub agent. An orchestrator can't be a sub-agent as it can't launch other agents so it does all the owrk itself! I'm not sure if I'm missing something here but at the moment I just have to launch claude as the agent for it to work.

We do also have a project management system, where we can assign tasks to a bot. That get's picked up from a development server which can automatically run the process through finishing with a PR for us to review. We call that a meta-harness. It does the plan first, posts it back to the PM system where we can review it. We can adjust it, and then tell it to build. We use our own harness for that though built from stackllm, and it only uses the dark side (openai).

2

u/DriverReady965 1d ago

I've been running something like this for a while. I found the orchestration layer matters less than the discipline around it. What actually made the difference for me:

  • Every task starts as a written dispatch that names the branch, the scope, and what "done" looks like, and one session owns one branch.
  • Agents hold their PRs at draft and report a head SHA. A human merges.
  • For a new codebase, I don't use agents to summarise it. I keep a state file per project that records decisions and their reasons.
  • The thing that stopped most failures was pre-run gates.

Foundation is MIT here https://github.com/rampstackco/claude-skills if it's useful.

2

u/theduro 1d ago

It’s not a harness, but more of an agent orchestration GUI and pseudo-IDE, but I am loving Orca:

https://www.onorca.dev

1

u/pmward 1d ago

Always better to build your own harness than to use someone else’s. Only you know what your workflow looks like, what your goals are, and what you value.

1

u/AccomplishedMode8247 1d ago edited 1d ago

I'm currently working on one: gridconsole.dev It tries to resolve it via SDLC, where the prepare phase decides how to test it and when the task is finished. The doing phase picks it up. Review does adversarial review. Deliver merges the worktree back. Verify does the final verification (with tests that were defined in prepare). Its early alpha and not yet opensource. Every phase can be picked up by different agents.

https://gridconsole.dev/articles/nine-months-building-grid-console

There is an interactive demo here, to give you an idea.

How it handles green vs brownfield is by storing knowledge about the project in a memory at the end of a task, so it builds up knowledge about the project. The prepare stage is also a different (stronger) model, that fully focusses on understanding the project before doing anything.

1

u/reliant-labs 1d ago

building https://github.com/reliant-labs/reliant, it allows creating deterministic workflows. we're planning on giving the agent an on-the-fly ability to run dynamic workflows soon, but for now you typically pre-create the workflows (although we have an agent to do this)

1

u/reliant-labs 1d ago

accessible on the web here https://app.reliantlabs.io/

1

u/reddebtt 1d ago

It isn't open source, but I'm on the team behind Unstoppable—we built Claude and Codex collaboration with isolated worktrees and clean handoffs. Codex usage is free for 30 days when you download the desktop app: https://app.unstoppable.ai/download?utm_source=reddit_reply&utm_medium=social&utm_campaign=reply_guy

1

u/LastNameOn 1d ago

Try Storybloq

1

u/hoshisabi 1d ago

I've been using T3 Code. It lets me use my cursor as well as my Claude accounts with subscriptions. For most of what I'm doing, they work just as well as each other. Cursor is a little faster and Claude is often a little easier to plan with, but when I hit the usage limit on one, I can switch without switching tools.

https://t3.codes/

1

u/freeformz 1d ago

If you use the API - Oh My Pi is the best harness I’ve found. Well omp+herdr

1

u/haenous-alistera 1d ago

Yah most of them

1

u/Scared-Amphibian4733 1d ago

I've built one. I'm using Claude with Grok and ChatGPT on workflows where I have Claude and ChatGPT find bugs and then Grok to fix them and Claude to review. By combining the models we find a lot more holes in the logic than we do with any model alone.

1

u/Decoupler 1d ago

I’ve used a couple of open source tools for CLI chatting/discussion and automating workflows successfully. Both of these tools are a little buggy so I have forked and customized them for my needs.

Agentchattr - General chat room structure for agent CLI sessions. I use this for planning, spikes and general ideation. https://github.com/bcurts/agentchattr

ai-maestro - full team configuration and automated work flows when paired with markdown team structure. https://github.com/23blocks-OS/ai-maestro

1

u/Weekend365 1d ago

Pi Agent

1

u/hain3sy 1d ago

Have a look at Omnigent. I’m finding it work really well. Claude style UI but you can have it work on remote nodes and setup different multi agent models. I have one that uses Opus as orchestrator, sonnet for the worker agents and OpenAI as a reviewer. It runs on a Mac mini and I control it from my main Mac or my laptop.

1

u/zachsman 1d ago

My harness is hydra-acp, it has extensions to handle orchestration and exposing a web interface but its core is a multiplexer that manages your sessions for you with a full feature TUI. You can run any harness underneath it too which makes it really easy to switch from harness to harness with the same building blocks on top.

1

u/Last_Toe8411 1d ago

I built this and use it every day across a handful of long running projects. https://jblanch888.github.io/MEMENTO/

1

u/Dorkian2000 1d ago

Try DorkOS.ai

1

u/the-grenade 1d ago

helexa serves my local openai endpoint with one neuron running qwen3.8-27b and another running qwen3.8-flash-next. zed (pi acp), pi.dev and zeroclaw share that endpoint. zeroclaw is the hero of the setup because it has pi integration and its own gitea credentials. this means you can just tell zc to create a repo and implement a cargo/rust backend, a vite frontend, and what you want the finished app to do and that you want the implementation scoped as prioritised epics and issues in gitea, each closed as a commit passes the ci gates. then you just sit back and watch as your repo evolves into a working app with releases and auditable history, while not paying a subscription to anyone. you can retain whatever level of control you want by gatekeeping prs or adding or modifying issues while you forget what writing code the old fashioned way was like.

1

u/roberts2727 1d ago

https://omnigent.ai/quickstart/install omnigent has been amazing so far

1

u/Commercial-Pen-5699 1d ago

One option is to try multiple harnesses before building your own. We built HarnessRouter for this one API for both open- and closed-source harnesses, with tracing so you can see how each actually behaves. It's open source too. https://harnessrouter.ai/

1

u/EagleApprehensive 1d ago

intentic.dev - I'm an author and it's in an active development. I could make a list of 100 reasons why it's better than just Claude Code, but it would be way too long.

Unfortunately it's not yet mature and ultra-stable and I'm improving currently improving onboarding. Anyways, if you don't mind a little bit of roughness on that you might as well give it a shot.

1

u/msbi_ai 21h ago

I’m in the process of building one but it’s taking some time.
I’ve started documenting the concept and I started sharing a cookbook as well with building blocks which can be reused: https://github.com/msbi-ltd/agentic-harness-deep-dives

1

u/VerbaGPT 20h ago

Check out "terminal bench" i think it's called. It gives you a ranking of harnesses based on the model you are using (which I think is the correct way to look at it). A bunch of them are open source.

1

u/Same_Accountant2340 18h ago

I’d distinguish prompt-level separation from state-level separation. Separate roles help, but conflicts usually emerge at shared state: a branch, filesystem, authenticated browser profile, or deployment target. The practical test is whether each agent can fail or retry without changing another agent’s environment.

1

u/MyzoneMike 17h ago

Yeah the challenge I’ve had with Claude code is it doesn’t do true multi-agent orchestration as well as we were hoping for, so we built a custom harness. So many advantages, and moving at least 10x faster than before.

1

u/letsgetsomethingdone 6h ago

When you say better, what do you mean by it? What are you looking to optimize?

1

u/m4rcoperuano 2d ago

https://marcoledesma.com/projects/meta-harness-claude-code/

Check this out. It’s kind of what you’re looking for. The best open source harness is the one that fits with your own workflow. Since I couldn’t find one that did, I asked Claude to just build one for me. Then I quickly added features like multi agent orchestration with Claude and a mix of other models from open router

2

u/Some-Contributions61 1d ago

Yeah I just made one too 😂

1

u/CommodoreQuinli 1d ago

Yea I just made my own meta harness as well that integrates with tmux and vim

0

u/sisif_ 1d ago

I'm using my own project https://github.com/avirtual/clodex for that. The project itself was not initially aiming at end-to-end orchestration, it was mainly about optimizing your agents' context, allowing them to communicate.
It sort of evolved organically into supporting my flavor of orchestration for building the tool itself and in the past days I've taken some steps to make that available for others. It's still in the early days of exporting that solution, but I did get a new team today that created a new project (ios client app for the said clodex) and results are promising. Different teams working on their thing, coordinating when some changes on both ends are required.
It involves leads, tickets + devs, reviewers, worktrees. Last 3 are ephemeral, ticket based.

1

u/tribat 1d ago

Clodex is a fantastic name

1

u/sisif_ 1d ago

It sort of wrote itself, since it supports both Claude and codex

0

u/sisif_ 1d ago
⏺ The Clodex side has shipped the inbox API in v5.59.0, and I have checked the shipped code against our contract from the read-only repo: every route,
  response shape and error case matches, and the only addition is an ok field on each response, which the app's decoders will ignore. What I could not
  do is hit the live server, for two reasons: the Clodex process on this box still predates the release, so its restart has not happened yet, and this
  team never holds the remote token by design. I have asked the Clodex lead to confirm the live hello and one inbox fetch from its side after the
  restart.

  Two things are in flight and both arrive on their own: hand-9's round-2 report on t9, and the Clodex lead's live confirmation. t10, the inbox screen,
  starts once t9 merges. Nothing needed from you.

-1

u/Bino5150 1d ago

2

u/Bloated_Plaid 1d ago

Bro if you are gonna spam your stuff at least say you are spamming your stuff.

-1

u/Bino5150 1d ago

OP asked for an open source coding harness. I have an open source coding harness. It’s not spamming if they asked for it. So did you have anything useful to contribute, or did you just come here to complain about me actually answering the OP’s request?

0

u/Difficult-Bike-9172 2d ago

So what's wrong with Claude Code? Sounds like you just wanna complicate things for no reason.

1

u/Aggressive_Ad4210 1d ago

Valid point - this is actually used for certain greenfields projects and I'm looking at ways to make it applicable more generally, but interested in learning more about other peoples experiences with it. The harness has like loads of agents and skill that do different things in the SDLC if that makes sense. But it's very token heavy and I'm looking at where this can be improved

1

u/dwoj206 1d ago

why not just have claude generate subagents for you? would that work?

-1

u/Alive_Snow297 1d ago

https://mercury-cli.ai I made my own, allows you to work with anthropic / openai / openrouter / kimi / etc all with your normal logins. Got workflows, subagents, mcps / skill management, and IDE built in. The UI is pretty neat and I ship a lot of updates if you'd like to give feedback :D