BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News OpenCode: an Open-source AI Coding Agent Competing with Claude Code and Copilot

OpenCode: an Open-source AI Coding Agent Competing with Claude Code and Copilot

Listen to this article -  0:00

Open-source AI coding tool OpenCode features a native terminal-based UI, multi-session support, and compatibility with over 75 models, including Claude, OpenAI, Gemini, and local models. In addition to its CLI tool, OpenCode is also available as a desktop app and and an IDE extension for VS Code, Cursor, and other tools.

OpenCode allows developers to use their existing subscriptions to paid services such as ChatGPT Plus/Pro, GitHub Copilot. Additionally, it includes a set of free models that can be used locally through LM Studio.

OpenCode integrates with a wide range of Language Server Protocol (LSP) servers, including Rust, Swift, Terraform, TypeScript, PyRight, and others. This enables LLLMs to interact more effectively with a codebase by leveraging feedback from LSP server output.

The agent can use both remote and local MCP servers. However the developers caution that MCP servers increase the context size ahd some of them, namely the GitHub MCP server, "tend to add a lot of tokens".

OpenCode can be used with any editor supporting the Agent Client Protocol (ACP), which aims to standardize communication between code editors/IDEs and coding agents. The list of compatible editors includes JetBrains IDEs, Zed, Neovim, Emacs, while work is ongoing for Eclipse and other editors.

Anomaly Innovations, the company behind OpenCode, emphasizes its privacy-first architecture, meaning that OpenCode does not store code or context. Users have full control on session sharing, with options for manual sharing, auto-sharing, or disabling sharing entirely. Shared conversations can be unshared once collaboration is complete, and sharing can be disabled at the team level via configuration for sensitive projects.

According to its creators, OpenCode is best suited for power-users and teams that require control, auditability, and avoiding vendor-locking, as well as for privacy-sensitive environments. They note that it may not be the best solution for beginners looking for a purely no-code experience.

Redditor Specialist_Garden_98 happily summarized the benefits of OpenCode's support for multiple LLMs:

This is good because you can have your own workflow, You can configure it such that it uses like a cheaper model when you are just conversing with it and planning on what to do and boom, switch to an expensive model when actually executing.

They also highlighted the usefulness of being able to undo a change if the results are unsatisfactory. On the other hand, copenhagen_bram critized that the tool does not appear to ask for permission before running a command, which could pose a risk.

OpenCode is available on GitHub where it has collected over 95K stars and lists hundreds of contributors.

About the Author

Rate this Article

Adoption
Style

BT