Hacker News

Hacker News

Ask HN: What is a good open-weight alternative to Claude Code?
1 points by sid1992 •                         
I spin up a Claude code session for everything, including non coding related tasks. I love the terminal interface. What is a good alternative to try?
andsoitis •                         
Just to be precise, Claude Code is a coding agent (not an LLM) that uses Claude models (e.g. Opus).

So, are you asking:

a) using an open-weight alternative to other Claude models?

b) using an open-source alternative to Claude Code, but still use Claude models and/or open-weight models

c) something else?

sid1992 •                         
a harness that has a similar ux and a model recommendation that is as snappy and intelligent
andsoitis •                         
> similar UX

What about a better (more workflows, more comprehensive) user experience? E.g. Cursor or Pi?

solyin •                         
c) both of the above

d) something else

airhangerf15 •                         
Your terminology is a bit wrong. "Claude Code" has no "weights." It's a harness. It contacts Anthropic servers and runs their closed weight models.

The harness provides a means for the LLM to write file output and run tools (commands) to test output. Alternative harnesses including things like OpenCode.

You can point OpenCode to your Anthropic account, but only if you have API usage (there are ways around this, but if Anthropic detects it you could get banned). Anthropic locks their subscription plans to THEIR harness and no others.

Most harnesses like OpenCode, Cursor, Pi, Hermes, etc. have settings to tie into a bunch of different providers (although they'll always try to promote their own by default, because they have to fund their own harness development of course).

I recommend OpenCode + OpenRouter. OpenRouter has a bunch of models and their web interface shows where those models are run (AWS Bedrock, xAI, Anthropic, etc.) and what data they collect from your prompts (although this is kinda a 'trust me bro' status as a provider could be lying about collecting data).

sid1992 •                         
thanks for the correction - what model would you suggest?
airhangerf15 •                         
GLM-5.x and Kimi 3.x are good open weight models. In theory one could run them locally if the prices of the DGX/Halos ever come back down (you use to be able to run them on ~$20k worth of hardware, but now it looks like you need $40k worth of hardware after all the recent price jumps. Gorgon Halo and newer memory offloading techniques might change that).

With OpenCode you can run /model and just select whatever your provider offers. I always recommend not using prompts. Create an AGENT.md with your project rules, then create a plan/01-initial-requirements.md. Write an entire requirements spec. Commit those. Then tell the LLM "Read AGENT.md for project rules and run plan/01-initial-requirements.md".

That way you can commit that output on a branch, jump back to the original commit, and run the plan again with a different model. You can do that multiple times and compare the output on all the branches. Some models might give you better UI, some better structure. You can just keep the one you like most, or ask a model to combine certain aspects of each branch into your final.

seanmcdirmid •                         
DeepSeekHarness is also an option. DeepSeek flash is a pretty competent as a model, and is open weight (although you are better off buying tokens from DeepSeek).
verdverm •                         
OpenCode and their Go plan

good out of box experience for the harness, cheap plan with generous quotas

You can use the Go plan with any harness, so you could keep the Claude CLI while using open models.

sid1992 •                         
awesome thank you! do they have routing built in?
verdverm •                         
I believe so, but I do not use routers. Instead I typically start with a flash model for the task, and if it gets on the struggle bus, bump up to Kimi.