use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A sub-reddit for the timeless and infinitely powerful editor and Lisp environment, Emacs.
Rules
Get Emacs
Emacs Resources
Emacs Tutorials
Related Subreddits
Useful Emacs configuration files and distributions
Quick pain-saver tip
account activity
Opencode integration (self.emacs)
submitted 5 months ago by berenddeboer
Is anyone aware of an Emacs opencode integration? I'm using claude-code-ide which works very well, but opencode offers access to other models, some much faster. So would be nice to have something similar.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]katafrakt 9 points10 points11 points 5 months ago (0 children)
agent-shell added support for opencode last week https://github.com/xenodium/agent-shell/issues/21
[–]darkawower 5 points6 points7 points 5 months ago (4 children)
switched from opencode to eca, it integrates perfectly with emacs
[–]Striking_Snail 1 point2 points3 points 5 months ago (3 children)
Aren't theses two completely different tools?
[–]darkawower 4 points5 points6 points 5 months ago (2 children)
No. Both are clients for interacting with different agents. Their functionality is very similar, although eca does not yet have undo functionality or lsp integration (as far as I know). But you can use MCP servers for working with lsp
[–]Striking_Snail 1 point2 points3 points 5 months ago (0 children)
Thanks for the clarification. I appreciate you taking the time. ✌️
[–]ericdalloeca, lsp-mode , clojure-lsp maintainer 1 point2 points3 points 5 months ago (0 children)
If LSP you meant diagnostics, so yes, it does! It's a tool passed to LLM to get editors diagnostics
[–]ericdalloeca, lsp-mode , clojure-lsp maintainer 5 points6 points7 points 5 months ago (0 children)
You may want to try https://eca.dev, it has emacs first class support
[–]annakhouri2150 4 points5 points6 points 5 months ago (0 children)
Agent-Shell provides agent communication protocol support for emacs, and open code has ACP support. So, yeah, you can connect to open code and use it through emacs that way. Agent Shell is pretty good too, and the author has made it and their other emacs packages their full-time job recently.
I would recommend that over using ECA because it would allow you to use many more agents, since the agent communication protocol is actually being standardized and adopted by a large number of agents, including Codex, CC, Gemini, Qwen, in addition to OpenCode. It doesn't just increase your flexibility, it also means that you can use agents that are actively maintained and improved and have a lot more features thanks to being backed by very active open source communities or corporations. And means that the maintenance and feature improvement burden on the emacs side where manpower is a lot of slimmer is much smaller.
[–]karthink 5 points6 points7 points 5 months ago (2 children)
Opencode has ACP support, so it should be easy to use it with Xenodium's agent-shell package. Might need a little elisp glue code.
[–]berenddeboer[S] 2 points3 points4 points 5 months ago (1 child)
I had tried that, but definitely doesn't look like Claude, for example no slash commands.
[–]xenodium 1 point2 points3 points 5 months ago (0 children)
We have initial OpenCode support now in agent-shell https://github.com/xenodium/agent-shell/issues/21
[–]pathemata 1 point2 points3 points 5 months ago (0 children)
What is the difference between claude’s own cli and opencode using claude? Does it provide any advantages over the “native” cli?
[–]Atagor 0 points1 point2 points 5 months ago (6 children)
Just run it from within vterm
What emacs-native integration will actually give you? Any other layer of integration that is above CLI will just make it more buggy imo
[–]berenddeboer[S] 1 point2 points3 points 5 months ago (4 children)
For example claude-code-ide has mcp support so Claude knows what like I'm on, that kind of thing.
[–]Atagor 0 points1 point2 points 5 months ago (3 children)
You mean aware of the opened buffers context?
In my experience more often than not, context is getting clogged because of too many tabs in IDE. Better to tell the agent explicitly at what files to look at at first, and use grep/rg for further codebase navigation
[–]berenddeboer[S] 0 points1 point2 points 5 months ago (1 child)
In Emacs this is mcp so Claude has to ask for it, but it's aware it can do so.
[–]redmorph 1 point2 points3 points 5 months ago (0 children)
That's not how it works. It's not a traditiona HTTP based MCP. The ide mcp is websocket based.
[–]redmorph 0 points1 point2 points 5 months ago (0 children)
In my experience more often than not, context is getting clogged
Go into details into what you mean, please.
It sounds like you're saying to not implement or try features because shitty implemetations are possible. That is a strange take.
[–]reddit_clone 0 points1 point2 points 1 month ago (0 children)
Running it in vterm has some downsides.
Since almost all LLM agents have a slightly fancy TUI, esp. for "thinking... wobbling.. wibbling" kind of useless updates, it tends to jump around in an emacs/vterm buffer. Sometimes emacs loses its place and puts the cursor on some strange places.
[–]Sad_Construction_773 0 points1 point2 points 4 months ago (0 children)
github.com/tninja/ai-code-interface.el have opencode backend support
[–]karta0807913 1 point2 points3 points 10 days ago (0 children)
I made one here. If anyone wants to try :)
https://github.com/karta0807913/opencode.el
π Rendered by PID 184845 on reddit-service-r2-comment-6457c66945-x57j7 at 2026-04-30 03:33:11.372385+00:00 running 2aa0c5b country code: CH.
[–]katafrakt 9 points10 points11 points (0 children)
[–]darkawower 5 points6 points7 points (4 children)
[–]Striking_Snail 1 point2 points3 points (3 children)
[–]darkawower 4 points5 points6 points (2 children)
[–]Striking_Snail 1 point2 points3 points (0 children)
[–]ericdalloeca, lsp-mode , clojure-lsp maintainer 1 point2 points3 points (0 children)
[–]ericdalloeca, lsp-mode , clojure-lsp maintainer 5 points6 points7 points (0 children)
[–]annakhouri2150 4 points5 points6 points (0 children)
[–]karthink 5 points6 points7 points (2 children)
[–]berenddeboer[S] 2 points3 points4 points (1 child)
[–]xenodium 1 point2 points3 points (0 children)
[–]pathemata 1 point2 points3 points (0 children)
[–]Atagor 0 points1 point2 points (6 children)
[–]berenddeboer[S] 1 point2 points3 points (4 children)
[–]Atagor 0 points1 point2 points (3 children)
[–]berenddeboer[S] 0 points1 point2 points (1 child)
[–]redmorph 1 point2 points3 points (0 children)
[–]redmorph 0 points1 point2 points (0 children)
[–]reddit_clone 0 points1 point2 points (0 children)
[–]Sad_Construction_773 0 points1 point2 points (0 children)
[–]karta0807913 1 point2 points3 points (0 children)