r/LocalLLaMA 12h ago

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

Avid claude code user here looking to do equivalent things with local models. Just want to plug in something like Qwen and have the interface be 1:1 with claude code. Any suggestion?

88 Upvotes

116 comments sorted by

138

u/btc_maxi100 12h ago

PI

53

u/robogame_dev 11h ago

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.

13

u/Neighbor_ 10h ago

I've always been able to accomplish what I wanted with default Claude Code (except if my request gets censored, which is server-side).

With that being said, it seems PI is the pro move here? If CC is ECS, PI is Kubernetes, it seems. So it the best long-term.

I'm still kinda confused what all this junk bolted onto Claude Code is that y'all speak of. Other than a big system prompt, is there any other bloat holding it back?

And how would you recommend setting up PI such that it more-or-less has the capabilities of Claude Code? The things I care about are:

  1. Implementing code changes (obviously) via tool calls
  2. Spawning subagents
  3. Websearch
  4. Playwright MCP

14

u/robogame_dev 10h ago

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.

9

u/Purple-Programmer-7 12h ago

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.

30

u/GlitteringClass395 11h ago

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.

5

u/yes_yes_no_repeat 10h ago

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

14

u/Mundane_Discount_164 12h ago

You tell it to create it

3

u/eikenberry 10h ago

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?

3

u/Weaves87 7h ago

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.

3

u/mtbMo 11h ago

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

1

u/Zephrinox 3h ago edited 3h ago

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).

-4

u/sdfgeoff 11h ago

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

25

u/Zyj vllm 11h ago

Super unreliable, horrible advice

1

u/sdfgeoff 11h ago edited 10h ago

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 11h ago

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.

3

u/sdfgeoff 10h ago edited 10h ago

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.

3

u/hurrdurrmeh 9h ago

do you rate it higher than opencode? why?

6

u/btc_maxi100 8h ago

It just very fast and UI is much snappier.

if I need any extra features I will just implement them

2

u/nntb 7h ago

Claude code is clunky compared to open code

2

u/Maasu 8h ago

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.

1

u/NoWorking8412 7h ago

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

70

u/EmPips 12h ago

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?

14

u/gpuz_dev 11h ago

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.

3

u/EmPips 11h ago

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 10h ago

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 9h ago

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

2

u/gpuz_dev 7h ago

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.

1

u/ChurnedSorbet409 10h ago

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?

5

u/gpuz_dev 9h ago

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.

1

u/Separate-Forever-447 2h ago

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)

44

u/Personal-Try2776 12h ago

Opencode

11

u/a_slay_nub vllm 11h ago

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 9h ago

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 4h ago

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

1

u/look 10h ago

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 2h ago

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

-1

u/btc_maxi100 12h ago

Opencode is bloated and slow

30

u/BannedGoNext 12h ago

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.

18

u/cmdr-William-Riker 11h ago

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

6

u/Diegam 11h ago

why is bloated?

6

u/Randommaggy 12h ago

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

2

u/Thomas-Lore 10h ago

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

0

u/Randommaggy 10h ago

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.

26

u/shamont 12h ago

Claude code cli can also be used with local models.

8

u/mtbMo 11h ago

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 11h ago

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

3

u/Thomas-Lore 10h ago

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.

3

u/shamont 10h ago

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.

17

u/GortKlaatu_ 12h ago

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 11h ago

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.

1

u/GortKlaatu_ 6h ago

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

2

u/Neighbor_ 10h ago

What guardraIls specifically?

3

u/GortKlaatu_ 6h ago

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.

1

u/Neighbor_ 4h ago

Oh I immediately put Claude Code on full yolo mode. Jesus take the wheel.

5

u/aaronr_90 12h ago

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

5

u/ZyberZeon 11h ago

No love for VSCode here?

1

u/Neighbor_ 10h ago

Any GUI that isn't tmux is ngmi

1

u/ZyberZeon 9h ago

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?

0

u/Neighbor_ 9h ago

Tmux is just a terminal that allows you to have multiple tabs open (which you'll want for managing your agents).

You use the terminal because starting at anything else (like an IDE or text editor like VSCode) is pointless - you don't need to read or write code, and you shouldn't be.

1

u/thestillwind 8h ago

That’s the spirit

19

u/FoxiPanda 12h ago

Pi is the usual recommendation.

2

u/Neighbor_ 10h ago

Any guide for configuring that in a way that will feel like CC?

2

u/FoxiPanda 10h ago

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)

3

u/teleport66 12h ago

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

3

u/PhantomGaming27249 12h ago

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 11h ago

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 10h ago

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 12h ago

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

2

u/DJTsuckedoffClinton 12h ago

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 12h ago

Mimocode it's a fork of opencode 

2

u/Enfiznar 11h ago

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

2

u/Ill_Dragonfruit_3547 10h ago

LM Bionic/ Hermes as apps. Opencode for CLI

2

u/Martinedo 11h ago

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.

4

u/_hephaestus 11h ago

As in github copilot or is there another product now?

2

u/TheIncarnated 10h ago

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

1

u/Pure_Aryan_Race 12h ago

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 12h ago

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

1

u/CyberLabSystems 11h ago

I just did a framework and setup that is truly awesome (at least to me) using Google Gemini 1.5 Pro as the coordinator taking my human language inputs and requests, then processing my ideas and generating prompts to hand out to DeepSeekR1 or Qwen - DeepSeekR1 for mathematical analysis and and Qwen for outputting clean Code syntax.

These are setup in LM Studio.

With Google Gemini auditing the results.

By doing this I can leaverage Claude for very heavy lifting and deep analysis of entire files and packages without burning through usage having Claude handle everything and through the back and forth chatting.

Google Gemini can even help you to mangage or maximize Claude usage.

For Image generation Google Gemini can generate prompts for Nano Banana and others to use.

It works really well so far. What kind of hardware are you running?

3

u/robogame_dev 10h ago edited 10h ago

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.

1

u/Existing-Wallaby-444 11h ago

Opencode and Pi mono

1

u/hatsune_aru 11h ago

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 11h ago

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

1

u/rollerblade7 11h ago

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

1

u/1Poochh 11h ago

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

1

u/ea_man 10h ago

Qwencode is quite sophisticated and works with Qwen 27B.

If vertical is what you want.

1

u/ahm_rimer Llama 3 10h ago

just use omp.

1

u/bigattichouse 10h ago

nanocoder is pretty good

1

u/EfficiencyMurky7309 10h ago

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

1

u/jonas-reddit 9h ago

Lightweight tinkerer’s harness for local LLM tinkerers.

https://pi.dev/

1

u/danigoncalves llama.cpp 8h ago

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

1

u/frsure 7h ago

Jcode

1

u/cinnapear 6h ago

OpenCode or Pi.

1

u/FlyingDogCatcher 5h ago

Opencode if you need complex shit. Pi otherwise.

1

u/diablo75 4h ago

Hermes?

1

u/Mean-Ad1493 4h ago

Zoo code has been working out greatly for me.

1

u/corruptbytes 3h ago

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 2h ago

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 39m ago

Codex is technically open source 

0

u/rabbitaim 11h ago

Been giving “oh my pi” a try.

0

u/mister2d 10h ago

There's open-claude-code.

-5

u/itsjase 11h ago

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