opencode icon indicating copy to clipboard operation
opencode copied to clipboard

[FEATURE]:Official - OpenCode VS Code extension

Open c2b247 opened this issue 10 months ago • 43 comments

Feature hasn't been suggested before.

  • [x] I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Summary

I’d like OpenCode to be available as an official Visual Studio Code extension, so it can run as a native panel/side view within VS Code instead of only as a standalone terminal UI.

Problem

Right now, the typical way to use OpenCode is through a terminal. This works, but it has a few practical limitations for developers who live inside VS Code:

  • Switching back and forth between the terminal and the editor breaks flow.
  • The TUI doesn’t behave like a first‑class VS Code panel (e.g. resizing, layout persistence, focus, keyboard shortcuts).
  • It’s harder to integrate OpenCode workflows with other VS Code features (source control, problems view, outline, etc).

For those of us using OpenCode as a central coding agent, having it only in the terminal makes the experience feel more like a separate tool than a tightly integrated part of the IDE.

Proposal

Create an official Opensource OpenCode VS Code extension that:

  • Renders OpenCode in a dedicated view/panel (e.g. a sidebar or main panel) instead of just a terminal.
  • Uses VS Code’s Webview / custom view / panel APIs (or similar) so:
    • The OpenCode interface can be docked, resized, and positioned like other panels.
    • Layout is remembered between sessions.
    • Focus, keybindings, and navigation feel native to VS Code.

Possible features for the extension

  • Integrated agent panel: A persistent OpenCode panel where the agent UI lives, rather than a transient terminal.
  • Project‑aware context: Automatically picks up the current workspace, repo, and open files, using VS Code APIs instead of shell heuristics.
  • Commands & keybindings:
    • “Open OpenCode panel” command.
    • Quick commands to send the current file/selection to OpenCode.
    • Customizable hotkeys for common agent actions.
  • Status bar integration: Simple status indicator (e.g. agent running, thinking, idle, error).
  • Configuration UI: VS Code settings page for OpenCode config, keys, backends, etc., instead of editing config only via files/CLI.

Benefits

  • Better UX inside VS Code: OpenCode feels like a first‑class citizen, similar to other popular AI/code tools that ship as VS Code extensions.
  • Less context switching: Developers can keep OpenCode visible alongside editor, terminal, and source control.
  • More discoverable and approachable: Installing from the VS Code marketplace greatly lowers the barrier to trying OpenCode for new users.
  • Easier integration with other tools: Extension can hook into VS Code’s APIs to provide richer workflows (e.g. running specific tasks, opening files suggested by the agent, etc.).

Additional Context

My main use case is running OpenCode as a primary coding agent while staying entirely inside VS Code. Having an official extension that opens properly in a VS Code pane (instead of just a terminal window) would make OpenCode much easier to adopt and use as a daily driver for development.

c2b247 avatar Jan 29 '26 18:01 c2b247

This issue might be a duplicate of existing issues. Please check:

  • #9960: vscode extension of opencode
  • #8794: When will the official OpenCode plugins for IntelliJ IDEA, PyCharm, and VS Code be released?
  • #7275: cleaner and more aware extensions integration with vscode
  • #216: Editor integrations

Additionally, related feature requests that address IDE integration challenges:

  • #9578: IDE-native Diff Review & Accept/Reject Workflow for Code Changes Made by opencode
  • #8003: VS Code Integration for Reviewing OpenCode Code Changes (Diff Preview)

Feel free to ignore if none of these address your specific case.

github-actions[bot] avatar Jan 29 '26 18:01 github-actions[bot]

https://marketplace.visualstudio.com/items?itemName=sst-dev.opencode https://marketplace.visualstudio.com/items?itemName=sst-dev.opencode-v2

i think these are official extensions. though yes, plenty of room for improvement. i started https://github.com/anomalyco/opencode/issues/7275 but haven't gotten any traction here yet with even just the bug fixes i made along the way. they are busy here... 1.2k PRs and all.

altendky avatar Jan 30 '26 20:01 altendky

this is a great proposal

Pl8tinium avatar Jan 30 '26 22:01 Pl8tinium

Would be great to see progress on these, neither of the current versions are really functional in vscode.

https://marketplace.visualstudio.com/items?itemName=sst-dev.opencode is essentially just opening a window with opencode running in the terminal -- no actual GUI interface for selecting models etc. Note that essential shortcuts like ctl+p are overridden by vscode hotkeys, so not functional here or in the terminal.

https://marketplace.visualstudio.com/items?itemName=sst-dev.opencode-v2 looks like more promising sidebar integration, consistent with how most other major providers (cline, roo, continue, claude, codex, copilot etc) have implemented their vscode / vsx extensions. However the opencode one doesn't seem to be functional. (error: "There is no data provider registered that can provide view data." even while the non-beta extension is connected fine)

cboettig avatar Mar 03 '26 20:03 cboettig

i've tried to get just small bug fix PRs through but i think the team has been too busy for even that. otherwise i might have done more on my efforts to improve this integration.

altendky avatar Mar 03 '26 20:03 altendky

However the opencode one doesn't seem to be functional. (error: "There is no data provider registered that can provide view data." even while the non-beta extension is connected fine)

There's a specific issue for this: https://github.com/anomalyco/opencode/issues/10119

baob avatar Mar 12 '26 11:03 baob

This is a great issue. Compared to TUI, more members of our team still prefer using a GUI plugin in VSCode.

WustLCQ avatar Mar 16 '26 01:03 WustLCQ

Coming from Kilocode, Cline and Roo Code to opencode this is the only thing that is missing that would seal the deal and allow me to STOP using these other tools.

Yes granted that that you can use the TUI or the GUI app, but this proposal; at least to me seems like a no brainer!

afaraha8403 avatar Mar 21 '26 03:03 afaraha8403

Im in the same position as @afaraha8403 .

It looks like there is a VS code extension now: https://marketplace.visualstudio.com/items?itemName=sst-dev.opencode

But without screenshots, its hard to tell if this does what we are asking for

rosmur avatar Mar 24 '26 23:03 rosmur

@rosmur there have been two vscode extensions for a while now as I link above.

And no, neither does what we are asking for, they are basically identical to just running opencode in the vscode integrated terminal. Even that experience is far worse than it sounds, for instance -- as we all know, the command list in opencode is ctrl + p, which vscode already assigns to it's own command pallet, making it inaccessible unless the user disables this standard hotkey in vscode. This same issue impacts both of the vscode plugins. Without easily being able to even open the command list it hard to imagine anyone actually uses opencode inside vscode. It does work so nicely in a regular terminal of course.

Here's a screenshot of opencode just running in terminal (but vscode 'extensions' seem to be functionally identical to this). Contrast that to the kind of integration we see on the right-hand menu for claude (or roo code, or copilot, or any first-class extension, but claude is a good example of another client that is obviously cli-first design, but nevertheless implements a meaningfully useful GUI here -- note the / command has been turned into a clickable button, the open file is displayed as the context, and the interface is rendered in rich-text).

Image

cboettig avatar Mar 25 '26 01:03 cboettig

I’ve developed a VS Code Web extension using Opus 4.6. It is currently working correctly; if anyone is interested, feel free to fork, modify, and improve it.

https://github.com/cpkt9762/opencode-web-for-vscode

Image

cpkt9762 avatar Apr 09 '26 08:04 cpkt9762

A VS Code GUI could improve popularity and the ease of use.

cbarkinozer avatar Apr 13 '26 12:04 cbarkinozer

+1 for the config UI.

This will be especially helpful when working on multiple projects "simultaneously" on different machines or via devcontainers.

It will definitely ease usage, right now it is a pain to setup a devcontainer for usage with opencode. As far as I see it atm:

  • Either do the configuration in every devcontainer separately
  • Or bring config into the devcontainer via ugly linking of local devcontainer host config into the workspace

Configuration via settings.json would remove this ugly / repeated workarounds.

skwde avatar Apr 24 '26 05:04 skwde

I just tried to install sst-dev.opencode in an ubuntu:noble based devcontainer then (according to instructions which tell me to ctrl + esc) and I get

root@923b6d8de0e1:PATH # opencode --port 21603
bash: opencode: command not found

agardnerIT avatar Apr 24 '26 10:04 agardnerIT

I have a problem, I use the opencode installation and the command opencodeis the desktop app, and cli is opencode-cli when I install the extension the icon always open desktop app. Any ideas about how to change it?

joseluisgs avatar May 05 '26 07:05 joseluisgs

It would be awesome if the opencode has an extension similar to the chat/claude/codex/continue etc. where I can use it in the right panel instead of terminal.

enesdemirag avatar May 15 '26 11:05 enesdemirag

It would be awesome if the opencode has an extension similar to the chat/claude/codex/continue etc. where I can use it in the right panel instead of terminal.

Find one project: https://github.com/openchamber/openchamber

enesdemirag avatar May 15 '26 13:05 enesdemirag

I have a problem, I use the opencode installation and the command opencodeis the desktop app, and cli is opencode-cli when I install the extension the icon always open desktop app. Any ideas about how to change it?

have you remove the app the ensure the system variable updated ?

raddah avatar May 29 '26 01:05 raddah

Openchamber is great !

However, if you prefer to use VSCode own agent, latest v1.122 has BYOK without needing a Copilot subscription (or without even logging in to Github). They've also added support for custom models so we can add Opencode Zen endpoints.

You'll have to update your chatLanguageModels.json json file. See here: https://gist.github.com/mderazon/8ff62cabb025218024ba47be5b06a877

Note:

  1. I have not tested all models, just a few, if you have found some other values that work better, please comment on the gist so we can all benefit...
  2. Change to plug your own api key...
  3. Config supports some capabilities like supportsReasoningEffort, reasoningEffortFormat, editTools, but Opencode doesn't publish these so we have to figure out what works for each model
  4. I have no idea how efficient this is and how it can affect cache hits
Image

EDIT: another comment down below (https://github.com/anomalyco/opencode/issues/11176#issuecomment-4679944698) mentions this vscode extension which seems better: https://github.com/ltmoerdani/opencode-copilot-chat

mderazon avatar May 29 '26 13:05 mderazon

I believe this is crucial for both the product and the business – having a ZooCode‑like experience is really important for everyone. The CLI is fine, but it’s not how people actually work day to day; it feels more like a toy or something suited only for non‑interactive workflows.

mmospanenko avatar May 31 '26 10:05 mmospanenko