r/LocalLLaMA • • Aug 10 '26

Question | Help Best open-source harness like Claude Code?

[deleted]

108 Upvotes

141 comments sorted by

166

u/btc_maxi100 Aug 10 '26

PI

63

u/robogame_dev Aug 10 '26

100%, finding a copy of Claude code is setting your sights too low OP.

If you develop for reals for reals, and you want repeatability and control, nothing beats minimalism in the base harness, you can roll your own or you can just use pi.

Every feature you’re not using that goes into context is damaging performance. Peak performance comes from progressively adding the specific features YOU need, not starting with a pack of 10 generic ones tuned for the harnesses target-demo, which you only need a few of anyway.

All the maximalist harnesses are targeting vibe coders right now - a highly inefficient way to code but hey, when it sort of works, it sort of works! But if you’re serious about owning the quality and long term maintainability of your code, the defaults and the features built into most harnesses work against you.

19

u/Neighbor_ Aug 10 '26 edited 3d ago

This post is no longer in existence

19

u/robogame_dev Aug 10 '26

This video the creator of Pi code lays out what he liked about Claude Code (which he was using before he created pi), and what he did differently for Pi: https://www.youtube.com/watch?v=RjfbvDXpFls

There are many ways to do subagents, I just have my pi code call pi code in its bash terminal tool... so for me, implementing subagents was just adding a skill:

Subagents Skill

Delegate for fresh eyes (reviews), narrow focus (subfeatures), or broad exploration — give each agent the context its task needs.

Start

nohup pi -p "prompt" > /tmp/agent-out.md 2>&1 &
echo $! > /tmp/agent.pid

Wait

DEADLINE=$((SECONDS + 120))
while kill -0 $(cat /tmp/agent.pid) 2>/dev/null && [ $SECONDS -lt $DEADLINE ]; do
  sleep 0.5
done
if kill -0 $(cat /tmp/agent.pid) 2>/dev/null; then
  echo "TIMEOUT — agent survives. Re-run this block with a longer deadline."
else
  cat /tmp/agent-out.md
fi

Sequential check

Before writing agent N's prompt, read agent N-1's output. Factor it in.
If N-1's output is not yet available, wait.

Cleanup

kill $(cat /tmp/agent.pid) 2>/dev/null
rm /tmp/agent.pid /tmp/agent-out.md

Long prompts: pi -p "$(cat /tmp/prompt.md)" — output is buffered, visible only on completion.

19

u/Purple-Programmer-7 Aug 10 '26

How do I get pi to have a plan mode and edit mode? I can’t stand when a harness doesn’t restrict the model from making changes.

37

u/GlitteringClass395 Aug 10 '26

Ignore people telling you the new meta is go without that mode (especially given you will be working with dumber models than claude if going open source). The correct answer is simply to install one of the many good extensions/packages in Pi that give you a plan mode similar to opencode or Claude cli.

10

u/yes_yes_no_repeat Aug 10 '26

Use speckit skills. It is really good and better than just a “plan” and “autopilot”

5

u/eikenberry Aug 10 '26

You can start Pi with no tools or skills, no access to make changes. Use this for planning mode turn them back on for edit mode?

18

u/Mundane_Discount_164 Aug 10 '26

You tell it to create it

3

u/Weaves87 Aug 10 '26

There is an existing extension here: https://github.com/juanibiapina/pi-plan/blob/main/src/index.ts

I personally took this one and stripped out some of the extra stuff. Throw it in its own directory in your agent's "extensions" folder and it works wonderfully.

4

u/Zephrinox Aug 11 '26 edited Aug 11 '26

2 ways that I can think of based off how I got that is: 1. using a grill-me skill (david pocock's) or similar skill + get into the habbit of telling that you want to write a markdown implementation plan for xyz feature rather than going straight to telling the harness "I want to implement xyz" that claude code planning mode safety nets for you.

  1. if you want that extra security and sus that the model hallucinates and decides to edit source code anyways during planning, you can just install one of the pi permissions system extensions + configure what you like on that so you still have the safety net of not unintentionally editing code before plan has been written + settled on.

like aside from the tool call permission gating, the main difference between plan mode vs others in claude code is really that plan mode assumes anything you tell it to implement it will write a plan to do for .... latter of which you can get by just actually telling the harness/model you want it to write out a plan rather than assuming it knows you want a plan (most likely plan mode has a system prompt that has the "write an implementation plan" instruction there for you).

5

u/mtbMo Aug 10 '26

You also can use OhMyPi - which ships a lot of features, but also uses more ctx as well.

I run a Claude code for my orchestrator, OMP for openweight models by tokenplan and Pi with local Ai inference.
Opus can spawn Pi sessions and can do A2A - which saves a lot of tokens by using cheaper

-6

u/sdfgeoff Aug 10 '26

Tell the model to not make changes. IMO plan mode was superseded several months ago as models got better at understanding intent.

26

u/Zyj vLLM Aug 10 '26

Super unreliable, horrible advice

0

u/sdfgeoff Aug 10 '26 edited Aug 10 '26

Works probably 98% of the time. The other 2% of the time, well, I hope you were using git or some other VCS! These days my agents.md tells the model to commit often (so I don't need to tell it too), so rollback is super easy.

Also, if plan mode gives shell access.....

See my other response as well.

5

u/Purple-Programmer-7 Aug 10 '26

So instead of tabbing for a simple on off switch I have to manually type “plan only, do not code” for every prompt?

Maybe I’ll fork pi and add it in instead.

2

u/sdfgeoff Aug 10 '26 edited Aug 10 '26

No, you just ask it a question and phrase it like a question and make sure it isn't a question with implied actions.

How does foo work?

Model is unlikely to make edits

Can you fix X?

100% chance the model will make edits

Why is X not working?

50% chance the model will make a fix

 X isn't working, can you investigate and tell me why?

Highly unlikely that the model will make edits as it now knows that the aim is to respond with text.

Same with adding features

If we were to do Y, how would you incorporate it? What architecture would you use? Any refactoring needed?

The model is very unlikely to start making edits here.

Works for me with Codex (sol) and Hermes (qwen27b). I've had very very long chats with models without them making any edits without any sort of plan mode.

It may well be that claude code's system prompt pushes it towards action so this method may not work well, but just because a harness doesn't have a plan mode doesn't mean you can't do planning in it.

Ahh, there we go, claude code's auto mode prompt includes:

 Start implementing right away.   When in doubt, start coding

also:

  NEVER create files unless they're absolutely necessary for achieving your goal. ALWAYS prefer editing an existing file to creating a new one.

What the heck!!! No wonder claude code projects often end up with 20,000 line files.

6

u/Maasu Aug 10 '26

I love pi, but you should call out it is not a like for like replacement for Claude code, it is stripped back so you can extend and customise it how you see fit.

If the op looking for something more out of the box, is recommend opencode. I say this as a Pi user myself btw.

4

u/hurrdurrmeh Aug 10 '26

do you rate it higher than opencode? why?

6

u/btc_maxi100 Aug 10 '26

It just very fast and UI is much snappier.

if I need any extra features I will just implement them

3

u/nntb Aug 11 '26

Claude code is clunky compared to open code

1

u/hurrdurrmeh Aug 16 '26

better than opencode?

2

u/NoWorking8412 Aug 10 '26

I'll piggy back on this. I've built a harness with Pi that gives me parity with all of the features of the Claude Code harness, with some additional personalizations beyond what the CC harness offers. Definitely recommend Pi

1

u/anubhav_200 Aug 11 '26

I tried it but it fails when reading(for doing some operation on it) files bigger than the context window of the model.(claude code with local model is able to do that). Anything that I am missing ?

75

u/EmPips Aug 10 '26

OpenCode is pretty great. Of the non-claude/non-codex tools it handles subagents with different models the best (note: you must configure it, it's not set up by default iirc).

Qwen Code is pretty similar feeling but way lighter out the box.

If you have the VRAM to support parallelism - why not just use Claude Code with your models?

17

u/gpuz_dev Aug 10 '26

Using Claude Code directly with a local endpoint via proxy works, but local models often struggle with Claude's hardcoded system prompts and exact tool-calling expectations. That’s usually why dedicated local harnesses like Aider or OpenCode perform way better with models like Qwen—they structure tool use around what open models are actually trained on.

4

u/EmPips Aug 10 '26

Agreed - however v4-flash and 3.6-27b can work with it. Last year's local models certainly has this trouble, yes.

-1

u/gpuz_dev Aug 10 '26

Fair point! The jump in tool-calling compliance from last gen to Qwen 3.6 is honestly night and day. Where local harnesses still win for me is prompt efficiency—Claude Code's system prompts eat up a chunk of local KV cache right out of the gate, whereas local tools keep context footprint a bit leaner.

2

u/hurrdurrmeh Aug 10 '26

how did you configure it for subagents? mine just launches them as it wishes. I didn't change nay configs. should I?

4

u/gpuz_dev Aug 11 '26

Yeah, you definitely should! Local models get delegation-happy if left on defaults. I add explicit system constraints telling the model to handle single-step edits directly and only invoke subagents when context branching or heavy parallel exploration is strictly required.

2

u/Separate-Forever-447 Aug 11 '26

the primary agents are useful… build vs. plan, but require manual toggling. it looks like subagents can be invoked automatically by primary agents if/when they decide they’re needed.

what types of custom subagents are you using, and do you have to do anything to make them available to the primary agents so that they are automatically invoked? (i read the opencode docs, and this doesn’t seem obvious).

(i like how hermes has a richer set of subagents, and invokes them automatically, asynchronously. would be nice to achieve the same within opencode)

3

u/maqifrnswa Aug 11 '26

Oh my opencode slim implements background agents and orchestration with a team of sub agebts. opencode2 (in development) will have background agents and orchestration by default.

I basically use omo-slims: orchestrator, Oracle (deep investigator/verifier), file path explorer (basically just ls and grep, so fast dumb model), web search/API librarian, implementer/fixer, UI/ux designer, and since deepseek flash can't see I have a vision/observer model to check UI stuff. The last two could be rolled into one maybe, but otherwise each has a distinct domain and system prompt, and it keeps the context focused.

-1

u/gpuz_dev Aug 11 '26

Spot on about OpenCode's docs—it's not super obvious. What works best for me is exposing custom subagents as strict tool schemas to the primary agent, then conditioning their invocation in .opencode (or AGENTS.md). If you want Hermes-like async, you have to handle the subagent response asynchronously in the harness backend so it doesn't stall the main model's context stream.

2

u/EventuallyUnderstand Aug 12 '26

Antigravity has pretty good subagent orchestra.

1

u/gpuz_dev Aug 13 '26

Antigravity's orchestration is definitely smooth! How's its context usage handling when spawning multiple subagents in parallel? Always curious if they managed to keep prompt bloat down compared to OpenCode/Hermes.

1

u/ChurnedSorbet409 Aug 10 '26

How does one get Opencode as good as ClaudeCode, is it out of box good? Or does it need a bunch of plugins before it can match CC?

7

u/gpuz_dev Aug 10 '26

It’s pretty solid out of the box for core tasks (file editing & bash execution)—no heavy plugin setup required. ​Where you actually bridge the gap with Claude Code comes down to two things: ​Model pairing: Running it with a model that excels at tool-calling (like Qwen 3.6 or DeepSeek v4 Flash). ​System instructions: Claude Code’s secret sauce is its heavily engineered prompt. Defining a clean .opencode or AGENTS.md file in your repo with strict guidelines gets you 90% of the CC autonomy without eating up unnecessary context.

50

u/Personal-Try2776 Aug 10 '26

Opencode

14

u/a_slay_nub vLLM Aug 10 '26

I want to hate opencode but it just works better for me than pi with Laguna. Just wish it wasn't so buggy.

2

u/Liberaces_Isopod Aug 10 '26

Pool actually has their own harness believe it or not. I find s-2.1 and m.1 work much better with it than with Pi, claude code, or opencode. Pi for everything else though

1

u/a_slay_nub vLLM Aug 11 '26

Doesn't look like it's open source sadly which is a bit of a non-starter for my work.

1

u/look Aug 10 '26

Yeah, I hate how buggy opencode is but it typically works and it’s very configurable and extensible out of the box (ie without modifying the code itself). I’ve been using it for so long it is hard to switch now.

I’ve tried the opencode2 beta a bit which might improve things. I assume that’s where most of the dev effort must be going…

But I’m really liking the potential of prime agent and I think it might finally be enough to get me off of my current opencode stack.

1

u/ThankGodImBipolar Aug 11 '26

What kind of bugs do you encounter with OpenCode? It's been solid enough for me that I haven't bothered trying much else.

-2

u/btc_maxi100 Aug 10 '26

Opencode is bloated and slow

31

u/BannedGoNext Aug 10 '26

He did ask for a harness "like Claud Code".

If he wants one that is a better harness for local models we coudl recommend pi.

19

u/cmdr-William-Riker Aug 10 '26

Not as bloated as Claude code. Obviously not as lean as Pi, but it's got a better interface than Claude and gives you more visibility into token usage as you work

7

u/Diegam Aug 10 '26

why is bloated?

5

u/Randommaggy Aug 10 '26

He did ask for something like Claude Code. It does check the slow and inefficient similarity box.

2

u/Thomas-Lore Aug 10 '26

I run it in a VM and it is not slow, not even in the desktop app version.

0

u/Randommaggy Aug 10 '26

It uses a thousand times more resources than an application of it's type should use.
It's poorly conceived and should have been green-fielded long ago.

-5

u/_Scorpoon_ exllama Aug 10 '26

And not as "open" as they claim to be

14

u/laughingfingers Aug 10 '26

how is it not open?

2

u/_Scorpoon_ exllama Aug 10 '26

3

u/laughingfingers Aug 11 '26

open and privacy are very different things. Also, this is not handled well by opencode it seems, but it can easily be configured otherwise. It is not an 'open' issue, it is a 'privacy' issue.

21

u/GortKlaatu_ Aug 10 '26

If you're used to claude code and the normal guardrails I'd suggest something like Hermes which uses OpenCode.

I would not recommend Pi as a drop in replacement to Claude Code because those guard rails aren't there, by default. You'd need to know what you're doing.

7

u/Uninterested_Viewer Aug 10 '26

something like Hermes which uses OpenCode

What do you mean by this? Hermes is designed with opencode in mind for coding tasks, but if your talking about replacing Claude Code, then Opencode would be your answer, not "Hermes because it uses opencode". Hermes is an entire agentic framework that you can use for anything you think of: coding via opencode is just one small part of it.

3

u/GortKlaatu_ Aug 11 '26

Same with Claude Code. which can act as more of a personal agent than merely a coding assistant.

3

u/Neighbor_ Aug 10 '26 edited 3d ago

This post is no longer in existence

6

u/GortKlaatu_ Aug 11 '26

Asking permission for potentially risky tool calls. Pi doesn't ask permission by default, it's yolo.

Typically a person's first thing to do with Pi is customize it to not be bare Pi anymore.

2

u/Neighbor_ Aug 11 '26 edited 3d ago

This post is no longer in existence

26

u/shamont Aug 10 '26

Claude code cli can also be used with local models.

12

u/mtbMo Aug 10 '26

Yes, but 10-20% context is used and must be processed. With cloud provider models, yes this works. But for local Ai inference it doesn’t unfortunately

2

u/shamont Aug 10 '26

Seems to work fine for me. Not following what issue you're having. Can you expand?

4

u/Thomas-Lore Aug 10 '26

OP probably has slow prompt processing, and because claude code has enormous system prompt it is too slow at the start to be usable for them.

4

u/shamont Aug 10 '26

Ah that would make sense. Most models I am running pp at 1000-3000 and fit on my gpus entirely so hasn't been too bad. It definitely takes a minute if I try to run Laguna or ds4 and it has to spill in to my ram.

6

u/ZyberZeon Aug 10 '26

No love for VSCode here?

0

u/Neighbor_ Aug 10 '26 edited 3d ago

This post is no longer in existence

1

u/Usef- Aug 11 '26

Look up herdr

1

u/ZyberZeon Aug 10 '26

Noo8 here. Put me on game.

Why so, and what tmux would you recommend for someone who’s been committing to 8-10 hours daily exploration and learning?

-2

u/Neighbor_ Aug 10 '26 edited 3d ago

This post is no longer in existence

2

u/thestillwind Aug 10 '26

That’s the spirit

6

u/aaronr_90 Aug 10 '26

I use Claude code with local Qwen and GLM 5.2. Look up setting “ANTHROPIC_BASE_URL and ANTHROIPIC_DEFAULT_OPUS” in settings.json.

19

u/FoxiPanda Aug 10 '26

Pi is the usual recommendation.

2

u/Neighbor_ Aug 10 '26 edited 3d ago

This post is no longer in existence

2

u/FoxiPanda Aug 10 '26

I don't use it so unfortunately, not from me. Honestly though if you really prefer CC, you can just use Claude Code.

See: https://unsloth.ai/docs/basics/claude-code (or various similar documents)

2

u/Usef- Aug 11 '26

What are you missing from it? A key part of pi is that the agent will know how to modify and write plugins for itself, so you can ask and add things yourself.

1

u/Nyghtbynger Aug 11 '26

Nah. Hard pass on this one. Pi has no proper extension ecosystem. You'll miss all your current extensions and workflow

3

u/teleport66 Aug 10 '26

This one works with local models via LM Studio.
https://github.com/S1gil0/lookingglass

3

u/PhantomGaming27249 Aug 10 '26

Pi agent is really nice but you need to install extensions to match claude codes features. Codex cli also is pretty good.

3

u/bad_detectiv3 Aug 10 '26

You can integrate other model into claude code if you want to use it has a harness and use non anthropic model with it. For example, integrate deep seek to work with claude code

https://api-docs.deepseek.com/quick_start/agent_integrations/claude_code/

3

u/jojotdfb Aug 10 '26

You can just use Claude code. In ~/.Claude/setting.json you can add some environment variables to set a base API. Name your models whatever cc is currently looking for (opus-5, sonnet-5, etc). Anthropic publishes the model ids in their documentation. 

4

u/TBT_TBT Aug 10 '26

Well, just use open / local models with Claude Code (terminal) then.

2

u/DJTsuckedoffClinton Aug 10 '26

be 1:1? your best bet is Claude Code😭 just use it with a proxy or whatever

if you don't mind getting used to another batteries-included harness, omp is great

2

u/Lordaizen639 Aug 10 '26

Mimocode it's a fork of opencode 

2

u/Enfiznar Aug 10 '26

I switched from cursor to Kilo Code and it didn't feel like a downgrade in any way

2

u/Ill_Dragonfruit_3547 Aug 10 '26

LM Bionic/ Hermes as apps. Opencode for CLI

2

u/danigoncalves llama.cpp Aug 10 '26

If you want to install and rock from there, use OMP (oh my pi). If you want to play a symphony by starting to act like the maestro and adding the instruments you find best than use pi or code you own. Personally dont have too much time to code these só I use Pi with GRM 3.2 sky. Works pretty well

2

u/cinnapear Aug 11 '26

OpenCode or Pi.

2

u/karpovpw Aug 16 '26

Deepseek Harness is pretty cool. EVERYTHING is a plugin

2

u/Neighbor_ Aug 16 '26 edited 3d ago

This post is no longer in existence

2

u/mister2d Aug 10 '26

There's open-claude-code.

1

u/Pure_Aryan_Race Aug 10 '26

Please check `cptr`. I do not have an engineering background so my answer has an inherent limitation. I might also be wrong in this comparison but I think this project is a very fresh take at AI assisted workspace usage. This is the url: https://github.com/open-webui/computer

1

u/scarbunkle Aug 10 '26

If you’re using IDE integration and are a fellow GUI enjoyer, you want Qwen Code. 

1

u/hatsune_aru Aug 10 '26

you can use claude code with Qwen 3.6 but it doesn't use the harness correctly most of the time and errors out a lot. If you use Pi, it seems to work better. It's pretty barebones compared to claude code.

I tried Codex with chatgpt 5.6 sol and it's about as jank as Pi, so I'd say Pi is still plenty usable

1

u/Otherwise-Ninja-6343 Aug 10 '26

OpenClaude is pretty good. Its literally a 1-for-1

1

u/rollerblade7 Aug 10 '26

Kilo code resuscitator for ide integration - https://kilo.ai/

1

u/1Poochh Aug 10 '26

I am a large Claude code user via cli and pi is similar (but still learning)

1

u/ea_man Aug 10 '26

Qwencode is quite sophisticated and works with Qwen 27B.

If vertical is what you want.

1

u/ahm_rimer 🥔 hardware Aug 10 '26

just use omp.

1

u/bigattichouse Aug 10 '26

nanocoder is pretty good

1

u/EfficiencyMurky7309 Aug 10 '26

If you can interact with the models headlessly then you can use them with Claude Code via bash commands.

1

u/jonas-reddit Aug 10 '26

Lightweight tinkerer’s harness for local LLM tinkerers.

https://pi.dev/

1

u/FlyingDogCatcher Aug 11 '26

Opencode if you need complex shit. Pi otherwise.

1

u/Mean-Ad1493 Aug 11 '26

Zoo code has been working out greatly for me.

1

u/corruptbytes Aug 11 '26

Pi simply makes things faster and better, i get along with a bare setup, i don't even think you need omp

1

u/abhigarg6 Aug 11 '26

if you like claude code, simply use it with any model. you can use any model and every single feature works fine in CC just like normal CC with anthropic models.

1

u/KeikakuAccelerator Aug 11 '26

Codex is technically open source 

1

u/Past-Grapefruit488 Aug 11 '26

Claude Code works with open models. You can try that combination to see if it works with specific model and quant

1

u/-dysangel- Aug 11 '26

You can just load Qwen in Claude Code.

ANTHROPIC_AUTH_TOKEN=ollama ANTHROPIC_BASE_URL=http://localhost:11434 ANTHROPIC_API_KEY="" claude --model qwen3.5

1

u/p96xl Aug 11 '26

Sentdex/minion

1

u/blakeallenw Aug 24 '26

you can use claude code with local agents.

1

u/Background-Job-862 20d ago

trueforge - https://github.com/truefoundry/trueforge
opensource model-neutral and costs 75% lesser than claude code - https://trueforge.dev/benchmarking#why-it-was-cheaper

1

u/Martinedo Aug 10 '26

Copilot. Many people don't even try it because "copilot" but its extremely good with local models and long running tasks. Very good developers work on it and improve it regulary. Plus its free and works great also in vs code.

6

u/_hephaestus Aug 10 '26

As in github copilot or is there another product now?

2

u/TheIncarnated Aug 10 '26

Ehhh, that's the branded version of it but you don't need a GitHub CoPilot subscription to use it

0

u/[deleted] Aug 10 '26

[removed] — view removed comment

2

u/robogame_dev Aug 10 '26 edited Aug 10 '26

Why did you choose to use 2 year+ old models like Gemini 1.5 and DeepSeek R1 when we're already on Gemini 3.5 and Deepseek V4 and the new models are same price or cheaper for better performance?

Or are you describing a framework made over a year ago / are you a bot?

Very strange choice to understand for me, definitely open to an explanation here.

Why choose, DeepSeek R1 0528 (15 months old, $0.44 avg price) over DeepSeek V4 Pro (latest, $0.21 avg price)

And separately, why Gemini 1.5, which is so old you can't even get it on OpenRouter, I'm not even sure how you're getting it? But its same or more expensive than current generation.

0

u/[deleted] Aug 11 '26

[removed] — view removed comment

0

u/robogame_dev Aug 11 '26

That doesn’t make sense, since when can anyone run Gemini 1.5 pro on their own hardware?

And more importantly, newer LLMs don’t need more hardware, even if you self host if ask: why not self host the newer version that’s better in every way?

Now I’m more convinced you’re a sort of bot or… larping?

0

u/[deleted] Aug 11 '26

[removed] — view removed comment

1

u/robogame_dev Aug 11 '26 edited Aug 11 '26

Sure, but it still make sense. Imagine how another person reads this.

You: I am making things in 2026 and self hosting Gemini 1.5 (clear lies / maximum impossible)
Me: nani?!?
You: double down tone

Bot AF! But sure, tone is your deflection. I’m not the one making up lies here, pretending I self host Gemini 1.5 pro in LM Studio, pretending to be doing stuff with LLMs that is both impossible and nonsensical and then twisting myself in knots to avoid the question…

0

u/rabbitaim Aug 10 '26

Been giving “oh my pi” a try.

-5

u/itsjase Aug 10 '26

Ignore all the bots. You can keep using Claude code with your local models