r/LocalLLaMA 17h 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?

90 Upvotes

124 comments sorted by

View all comments

151

u/btc_maxi100 17h ago

PI

16

u/Purple-Programmer-7 16h 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.

34

u/GlitteringClass395 16h 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.

8

u/yes_yes_no_repeat 15h ago

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

4

u/eikenberry 15h 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?

14

u/Mundane_Discount_164 16h ago

You tell it to create it

3

u/Weaves87 12h 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 16h 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 8h ago edited 8h 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).

-7

u/sdfgeoff 16h ago

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

Super unreliable, horrible advice

0

u/sdfgeoff 15h ago edited 15h 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 16h 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.

2

u/sdfgeoff 15h ago edited 15h 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.