OpenCode – The open source AI coding agent

(opencode.ai)

251 points | by rbanffy 2 hours ago

39 comments

  • logicprog 8 minutes ago
    OpenCode was the first open source agent I used, and my main workhorse after experimenting briefly with Claude Code and realizing the potential of agentic coding. Due to that, and because it's a popular an open source alternative, I want to be able to recommend it and be enthusiastic about it. The problem for me is that the development practices of the people that are working on it are suboptimal at best; they're constantly releasing at an extremely high cadence, where they don't even spend the time to test or fix things (or even build a proper list of changes for each release), and they add, remove, refine, change, fix, and break features constantly at that accelerated pace.

    More than that, it's an extremely large and complex TypeScript code base — probably larger and more complex than it needs to be — and (partly as a result) it's fairly resource inefficient (often uses 1GB of RAM or more. For a TUI).

    On top of that, at least I personally find the TUI to be overbearing and a little bit buggy, and the agent to be so full of features that I don't really need — also mildly buggy — that it sort of becomes hard to use and remember how everything is supposed to work and interact.

  • softwaredoug 1 hour ago
    The team also is not breathlessly talking about how coding is dead. They have pretty sane takes on AI coding including trying to help people who care about code quality.
  • brendanmc6 46 minutes ago
    I’ve been extraordinarily productive with this, their $10 Go plan, and a rigorous spec-driven workflow. Haven’t touched Claude in 2 months.

    I sprinkle in some billed API usage to power my task-planner and reviewer subagents (both use GPT 5.4 now).

    The ability to switch models is very useful and a great learning experience. GLM, Kimi and their free models surprised me. Not the best, not perfect, but still very productive. I would be a wary shareholder if I owned a stake in the frontier labs… that moat seems to be shrinking fast.

    • quietsegfault 14 minutes ago
      Can you talk more about how you leverage higher quality models for the stuff that counts? Anywhere I can read more on the philosophy of when to use each?
  • ramon156 1 hour ago
    The Agent that is blacklisted from Anthropic AI, soon more to come.

    I really like how their subagents work, as a bonus I get to choose which model is in which agent. Sadly I have to resort to the mess that Anthropic calls Claude Code

    • pczy 1 hour ago
      They are not blacklisted. You are allowed to use the API at commercial usage pricing. You are just not allowed to use your Claude Code subscription with OpenCode (or any other third‑party harness for the record).
      • Robdel12 28 minutes ago
        Has it occurred to anyone that Anthropic highest in the industry API pricing is a play to drive you into their subscription? For the lock-in?
        • Macha 0 minutes ago
          The highest in in the industry for API pricing right now is GPT-5.4-Pro, OpenRouter adding that as an option in their Auto Router was when I had to go customise the routing settings because it was not even close to providing $30/m input tokens and $180/m output tokens of value (for context Opus 4.6 is $5/m input and $25/m output)

          (Ok, technically o1-pro is even more expensive, but I'm assuming that's a "please move on" pricing)

      • oldestofsports 1 hour ago
        I dont understand this, what is the difference, technically!
        • miki123211 42 minutes ago
          Anthropic's model deployments for Claude Code are likely optimized for Claude Code. I wouldn't be surprised if they had optimizations like sharing of system prompt KV-cache across users, or a speculative execution model specifically fine-tuned for the way Claude Code does tool calls.

          When setting your token limits, their economics calculations likely assume that those optimizations are going to work. If you're using a different agent, you're basically underpaying for your tokens.

          • echelon 27 minutes ago
            - OR - it's about lock-in.

            Build the single pane of glass everyone uses. Offer it under cost. Salt the earth and kill everything else that moves.

            Nobody can afford to run alternative interfaces, so they die. This game is as old as time. Remember Reddit apps? Alternative Twitter clients?

            In a few years, CC will be the only survivor and viable option.

            It also kneecaps attempts to distill Opus.

            • fnordpiglet 21 minutes ago
              It’s probably a mixture of things including direct control over how the api is called and used as pointed out above and giving a discount for using their ecosystem. They are in fact a business so it should not surprise anyone they act as one.
              • esperent 12 minutes ago
                It might well be a mixture, but 95% of that mixture is vendor lock in. Same reason they don't support AGENTS.md, they want to add friction in switching.
        • KronisLV 49 minutes ago
          With Anthropic, you either pay per token with an API key (expensive), or use their subscription, but only with the tools that they provide you - Claude, Claude Cowork and Claude Code (both GUI and CLI variants). Individuals generally get to use the subscriptions, companies, especially the ones building services on top of their models, are expected to pay per token. Same applies to various third party tools.

          The belief is that the subscriptions are subsidized by them (or just heavily cut into profit margins) so for whatever reason they're trying to maintain control over the harness - maybe to gather more usage analytics and gain an edge over competitors and improve their models better to work with it, or perhaps to route certain requests to Haiku or Sonnet instead of using Opus for everything, to cut down on the compute.

          Given the ample usage limits, I personally just use Claude Code now with their 100 USD per month subscription because it gives me the best value - kind of sucks that they won't support other harnesses though (especially custom GUIs for managing parallel tasks/projects). OpenCode never worked well for me on Windows though, also used Codex and Gemini CLI.

          • anonym29 45 minutes ago
            >or perhaps to route certain requests to Haiku or Sonnet instead of using Opus for everything, to cut down on the compute

            You can point Claude Code at a local inference server (e.g. llama.cpp, vLLM) and see which model names it sends each request to. It's not hard to do a MITM against it either. Claude Code does send some requests to Haiku, but not the ones you're making with whatever model you have it set to - these are tool result processing requests, conversation summary / title generation requests, etc - low complexity background stuff.

            Now, Anthropic could simply take requests to their Opus model and internally route them to Sonnet on the server side, but then it wouldn't really matter which harness was used or what the client requests anyway, as this would be happening server-side.

        • hereme888 1 hour ago
          Subscription = token that requires refreshing 1-2x/day, and you get the freedom to use your subscription-level usage amount any way you want.

          API = way more expensive, allowed to use on your terms without anthropic hindering you.

        • hackingonempty 48 minutes ago
          Anthropic has an API, you can use any client but they charge per input/output/cache token.

          One-price-per-month subscriptions (Claude Code Pro/MAX @ $20/$100/$200 a month) use a different authentication mechanism, OAUTH. The useful difference is you get a lot more inference than you can for the same cost using the API but they require you to use Claude Code as a client.

          Some clients have made it simple to use your subscription key with them and they are getting cease and desist letters.

        • jwpapi 1 hour ago
          about 30 times more cost
      • wilg 52 minutes ago
        Sometimes people want to be real pedants about licensing terms when it comes to OSS, assuming such terms are completely bulletproof, other times people don't think the terms of their agreement with a service provider should have any force at all.
      • hereme888 1 hour ago
        Was it not obvious what the OP meant by blacklisted?
        • Maxatar 1 hour ago
          Blacklisted usually means something is banned. OpenCode is not banned from using Anthropic's API.
        • enraged_camel 1 hour ago
          No, it was not? For those whose native language is English, "blacklisted" implies Claude API will not allow OpenCode.
    • lima 1 hour ago
      You can still use OpenCode with the Anthropic API.
      • pimeys 1 hour ago
        Yep. That's what I do. Just API keys and you can switch from Opus to GPT especially this week when Opus has been kind of wonky.
        • stavros 1 hour ago
          I pay $100/mo to Anthropic. Yesterday I coded one small feature via an API key by accident and it cost $6. At this rate, it will cost me $1000/mo to develop with Opus. I might as well code by hand, or switch to the $20 Codex plan, which will probably be more than enough.

          I'd rather switch to OpenAI than give up my favorite harness.

          • xienze 54 minutes ago
            Yeah I had a similar experience one time. Which is why I laugh when people suggest Anthropic is profitable. Sure, maybe if everyone does API pricing. Which they won’t because it’s so damn expensive. Another way to think about it is API pricing is a glimpse into the future when everyone is dependent on these services and the subscription model price increases start.
            • mattmanser 40 minutes ago
              I don't get why people talk about ChatGPT as some great saviour though, they're in the same boat but just have more money to burn.
        • gwd 1 hour ago
          Or have Claude write the code and Gemini review it. (Was using GPT for review until the recent Pentagon thing.)
        • jatora 1 hour ago
          'just API key' lol. just hundreds of dollars at a minimum
          • specproc 1 hour ago
            This is the problem with this bollocks. Outsourcing our brains at a per token rate. It'd be exciting if I didn't hand to pay Americans for it.
            • fr33k3y 1 hour ago
              I'm testing glm5 on Claude code and opencode just to stop consuming American... Soo good so far!
            • jen20 1 hour ago
              Qwen works fine and requires paying no-one except a hardware vendor.
    • cyanydeez 49 minutes ago
      a $3000 AMD395+ will get you pretty close to a open development environment.
      • anonym29 19 minutes ago
        There are boards starting in the $1500-$2000 range, and complete systems in the $2500-$2700 range. I actually don't know of any Strix Halo mini PCs that cost $3000, do you?
        • free652 1 minute ago
          the boards now are pricier, at least the framework one. I got it for 1700, and now its ~$2400.
        • Shebanator 3 minutes ago
          not mini PCs, no, but there are laptops that do
  • planckscnst 24 minutes ago
    I love OpenCode! I wrote a plugin that adds two tools: prune and retrieve. Prune lets the LLM select messages to remove from the conversation and replace with a summary and key terms. The retrieve tool lets it get those original messages back in case they're needed. I've been livestreaming the development and using it on side projects to make sure it's actually effective... And it turns out it really is! It feels like working with an infinite context window.

    https://www.youtube.com/live/z0JYVTAqeQM?si=oLvyLlZiFLTxL7p0

    • advael 20 minutes ago
      Seems interesting, but at a glance I can't find a repo or a package manager download for this. Have you made it available anywhere?
  • systima 8 minutes ago
    Open Code has been the backbone of our entire operation (we used Claude Code before it, and Cursor before that).

    Hugely grateful for what they do.

    • james2doyle 5 minutes ago
      What caused the switch? Also, are you still trying to use Claude models in OpenCode?
  • khimaros 1 hour ago
    i've been using this as my primary harness for llama.cpp models, Claude, and Gemini for a few months now. the LSP integration is great. i also built a plugin to enable a very minimal OpenClaw alternative as a self modifying hook system over IPC as a plugin for OpenCode: https://github.com/khimaros/opencode-evolve -- and here's a deployment ready example making use of it which runs in an Incus container/VM: https://github.com/khimaros/persona
    • riedel 1 hour ago
      Very cool! I have been using opencode, as almost everybody else in the lab is using codex. I found the tools thing inside your own repo amazing but somehow I could not get it to reliably get opencode to write its own tools. Seems also a bit scary as there is pretty much not much security by default. I am using it in a NixOS WSL2 VM
  • tallesborges92 4 minutes ago
    I’m happy with the one I built. (ZDX)
  • hippycruncher22 47 minutes ago
    I'm a https://pi.dev man myself.
  • Frannky 57 minutes ago
    I don't use it for coding but as an agent backend. Maybe opencode was thought for coding mainly, but for me, it's incredibly good as an agent, especially when paired with skills, a fastapi server, and opencode go(minimax) is just so much intelligence at an incredibly cheap price. Plus, you can talk to it via channels if you use a claw.
  • lairv 43 minutes ago
    I tried to use it but OpenCode won't even open for me on Wayland (Ubuntu 24.04), whichever terminal emulator I use. I wasn't even aware TUI could have compatibility issues with Wayland
    • samtheprogram 38 minutes ago
      Definitely not Wayland related, or so I doubt. I'm on wayland and never had any issues, and it's a TUI, where the terminal emulator does or does not do GPU work. What led you to that conclusion?
    • flexagoon 38 minutes ago
      > I wasn't even aware TUI could have compatibility issues with Wayland

      They shouldn't, as long as your terminal emulator doesn't. Why do you think it's Wayland related?

    • smetannik 34 minutes ago
      This shouldn't be related to Wayland.

      It works perfectly fine on Niri, Hyprland and other Wayland WMs.

      What problem do you have?

    • Gigachad 42 minutes ago
      Probably vibe coded
      • pixelmelt 30 minutes ago
        Some of the more recent versions of it had memory leaks so you couldn't just leave it on in the background
  • aimarketintel 22 minutes ago
    One thing that makes coding agents really useful is structured data access via MCP servers. Instead of the agent trying to scrape a webpage to understand your project's context, you give it a direct API to query structured data from 9+ sources (GitHub repos, Stack Overflow questions, arXiv papers, npm packages).

    The biggest bottleneck I've seen isn't the coding — it's the agent not having enough context about the ecosystem it's working in.

  • busfahrer 23 minutes ago
    I haven't been able to successfully get their CLI to reliably edit files when using local models, anybody else having the same problem?
  • Duplicake 28 minutes ago
    Why is this upvoted again on hacker news this is an old thing
    • zer0tonin 25 minutes ago
      Because this site is basically dead for any other subject than vibecoding and AI agents.
  • epec254 10 minutes ago
    Honestly I was a Claude code only guy for a while. I switched to opencode and I’m not going back.

    IMO, the web UI is a killer feature - it’s got just enough to be an agent manager - without any fluff. I run it on my remote VMs and connect over HTTP.

  • cgeier 1 hour ago
    I‘m a big fan of OpenCode. I’m mostly using it via https://github.com/prokube/pk-opencode-webui which I built with my colleague (using OpenCode).
  • __mharrison__ 1 hour ago
    This replaced Aider for me a couple months back.

    I use it with Qwen 3.5 running locally when my daily limits run out on my other subscriptions.

    The harness is great. Local models are just slow enough that the subscription models are easier to use. For most of my tasks these days, the model's capability is sufficient; it is just not as snappy.

    • cyanydeez 40 minutes ago
      I'm curious: I'venever touched cloud models beyond a few seconds. I run a AMD395+ with the new qwen coder. Is there any intelligence difference, or is it just speed and context? At 128GB, it takes quite awhile before getting context wall.
  • kristopolous 36 minutes ago
    Geminis cli is clearly a fork of it btw
  • p0w3n3d 1 hour ago
    For some reason opencode does not have option to disable streaming http client, which renders some inference providers unavailable...

    There's also a request and a PR to add such option but it was closed due to "not adhering to community standards"

  • singpolyma3 15 minutes ago
    OpenCode vs Aider vs Crush?
  • QubridAI 1 hour ago
    OpenCode feels like the “open-source Copilot agent” moment the more control, hackability, and no black-box lock-in.
  • siliconc0w 1 hour ago
    I reach for OpenCode + Kimi to save tokens on lower priority stuff and because it's quite fast on Fireworks AI.
  • everlier 53 minutes ago
    OpenCode is an awesome tool.

    Many folks from other tools are only getting exposed to the same functionality they got used to, but it offers much more than other harnesses, especially for remote coding.

    You can start a service via `opencode serve`, it can be accessed from anywhere and has great experience on mobile except a few bugs. It's a really good way to work with your agents remotely, goes really well with TailScale.

    The WebUI that they have can connect to multiple OpenCode backends at once, so you may use multiple VPS-es for various projects you have and control all of them from a single place.

    Lastly, there's a desktop app, but TBH I find it redundant when WebUI has everything needed.

    Make no mistakes though, it's not a perfect tool, my gripes with it:

    - There are random bugs with loading/restoring state of the session

    - Model/Provider selection switch across sessions/projects is often annoying

    - I had a bug making Sonnet/Opus unusable from mobile phone because phone's clock was 150ms ahead of laptop's (ID generation)

    - Sometimes agent get randomly stuck. It especially sucks for long/nested sessions

    - WebUI on laptop just completely forgot all the projects at one day

    - `opencode serve` doesn't pick up new skills automatically, it needs to be restarted

  • solomatov 38 minutes ago
    Do they have any sandbox out of the box?
  • arikrahman 44 minutes ago
    Can anyone clarify how this compares with Aider?
  • hereme888 1 hour ago
    The reason I'm switching again next month, from Claude back to OpenAI.
    • hungryhobbit 1 hour ago
      Yeah, support the company that promised to help your government illegally mass surveil and mass kill people, because they support a use case slightly better than the non-mass-murdering option.
      • stavros 1 hour ago
        Both of them promised to help their government illegally mass surveil and mass kill people. One of them just didn't want it done to US citizens.

        I'm not a US citizen, so both companies are the same, as far as I'm concerned.

        • hungryhobbit 54 minutes ago
          You are absolutely correct that both are evil ... as are most corporations.

          Still, I feel like "will commit illegal mass murder against their own citizens" is a significant enough degree more evil. I think lots of corporations will help their government murder citizens of other countries, but very few would go so far as to agree to murder their own (fellow) citizens ... just to get a juicy contract.

          • stavros 48 minutes ago
            I see your viewpoint but, to me, "both will happily murder you but one is better because they won't murder ME!" isn't very compelling. Like, I get it, but also it changes nothing for me. They're both bad.
            • cyanydeez 37 minutes ago
              watching trump get elected twice; you can see why americanos have no problemos with mental backflips when choosing.

              But you're still choosing evil when you could try local models

              • kykat 26 minutes ago
                Will you send me an H100?
                • cyanydeez 17 minutes ago
                  Are you doing something that actually demands it? Have you tried local models on either the mac or AMD395+?
      • Robdel12 26 minutes ago
  • nopurpose 1 hour ago
    Claude Code subscription is still usable, but requires plugin like https://github.com/griffinmartin/opencode-claude-auth
    • canadiantim 1 hour ago
      Sure but will you get banned by anthropic anyway?
  • vadepaysa 1 hour ago
    Things that make an an OpenCode fanboy 1. OpenCode source code is even more awesome. I have learned so much from the way they have organized tools, agents, settings and prompts. 2. models.dev is an amazing free resource of LLM endpoints these guys have put together 3. OpenCode Zen almost always has a FREE coding model that you can use for all kinds of work. I recently used the free tier to organize and rename all my documents.
  • caderosche 55 minutes ago
    I feel like Anthropic really need to fork this for Claude Code or something. The render bugs in Claude Code drive me nuts.
  • avereveard 1 hour ago
    isn't this the one with default-on need code change to turn off telemetry?
  • sergiotapia 1 hour ago
    If I wanted to switch from Claude Code to this - what openai model is comparable to opus 4.6? And is it the same speed or slower/faster? Thank you!
    • pimeys 1 hour ago
      GPT 5.4 has been the winner this week. Last week Opus 4.6. You can use both in OpenCode.
      • arbuge 1 hour ago
        How does it compare to using GPT 5.4 inside Codex?
        • pimeys 5 minutes ago
          I used Codex for a long time. It's definitely better than Claude Code due to being open source, but opencode is nicer to use. Good hotkeys, plan/build modes, fast and easy model switching, good mcp support. Supports skills, is not the fastest but good enough.
      • nxpnsv 1 hour ago
        Well not anymore with Claude pro…
    • rbanffy 1 hour ago
      If you want faster, anything running on a Cerebras machine will do.

      Never tried it for much coding though.

      • eli 56 minutes ago
        Outside of their (hard to buy) GLM 4.7 coding plans, it's also extremely expensive.
    • swyx 1 hour ago
      do you care about harness benchmarks or no?
      • sergiotapia 1 hour ago
        Just a data point, I would need to use it for my workflows. I do have a monorepo with a root level claude.md, and project level claude.md files for backend/frontend.
  • jedisct1 53 minutes ago
    For open models with limited context, Swival works really well: https://swival.dev
  • thefnordling 1 hour ago
    opus/sonnet 4.6 can be used in opencode with a github copilot subscription
    • solomatov 37 minutes ago
      Does github copilot ToS allow this?
      • swingboy 29 minutes ago
        I don't see why not. It's just using the Github Copilot API.
  • ftchd 1 hour ago
    minus Claude login
  • anonym29 48 minutes ago
    Just remember, OpenCode is sending telemetry to their own servers, even when you're using your own locally hosted models. There are no environment variables, flags, or other configuration options to disable this behavior.¹

    At least you can easily turn off telemetry in Claude Code - just set CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC to 1.

    You can use Claude Code with llama.cpp and vLLM, too right out of the box with no additional software necessary, just point ANTHROPIC_BASE_URL at your inference server of choice, with any value in ANTHROPIC_API_KEY.

    Some people think that Anthropic could disable this at any time, but that's not really true - you can disable automatic updates and back up and reuse native Claude Code binaries, ensuring Anthropic cannot change your existing local Claude Code binary's behavior.

    With that said, I like the idea of an open source TUI agent that won't spy on me without my consent and no way to disable it much better than a closed source TUI agent that I can effectively neuter telemetry on, but sadly, OpenCode is not the former. It's just another piece of VC-funded spyware that's destined for enshittification.

    ¹https://github.com/anomalyco/opencode/blob/4d7cbdcbef92bb696...

    • debazel 30 minutes ago
      Are you sure that endpoint is sending all traffic to opencode? I'm not familiar with Hono but it looks like a catch all route if none of the above match and is used to serve the front-end web interface?
      • flexagoon 27 minutes ago
        You are correct, it is indeed a route for the web interface
      • anonym29 22 minutes ago
        updated post accordingly
    • kristopolous 33 minutes ago
      I've point thought about making things that just send garbage to any data collecting service.

      You'd be surprised how useless datasets become with like 10% garbage data when you don't know which data is garbage

    • ianschmitz 24 minutes ago
      That linked code is not used by the opencode agent instance though right? Looks related to their web server?
    • flexagoon 27 minutes ago
      They don't. That is just the route for their WebUI, which is completely optional.
    • cyanydeez 18 minutes ago
      Does opencode still work if you blackhole the telemetry?
    • hippycruncher22 39 minutes ago
      this is a big red flag
  • WWilliam 19 minutes ago
    [dead]
  • rodchalski 14 minutes ago
    [dead]
  • webagent255 1 hour ago
    [dead]
  • the_axiom 1 hour ago
    [flagged]
    • crims0n 59 minutes ago
      We do seem to have a huge influx of Reddit refugees that don’t understand what makes this community different.
    • z3c0 49 minutes ago
      The topic at hand seems to shift the quality of the discussion greatly these days. Many people have thoughts on coding agents because they are aimed at the lower quartiles of coders. Far less have detailed opinions on other ways they could wield a Markov model.