Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>OpenCode AINew to Visual Studio Code? Get it now.
OpenCode AI

OpenCode AI

doomsec

|
3 installs
| (0) | Free
OpenCode projects, session terminals, commit drafts, and inline suggestions in VS Code.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

OpenCode AI

An unofficial OpenCode integration for VS Code and VSCodium. Requires an installed, running OpenCode V2 service. No Copilot dependency or Microsoft AI account is needed.

Features

  • Projects and sessions in an OpenCode sidebar, with search, pagination, execution status, and animated running indicators.
  • Star a project to pin it into the collapsible Favorites section at the top. Favorites persist across restarts.
  • Click a session to resume it in a full-sized editor terminal tab. Choose Reuse or New once; change the saved preference later in settings.
  • Choosing a project opens its folder and starts an OpenCode terminal for it: immediately when the folder is already open, otherwise as the reloaded window loads.
  • The OpenCode sidebar opens automatically by default whenever a window starts.
  • Generate an editable type(scope): description commit message from staged changes using the OpenCode action in Source Control.
  • Opt in to automatic inline suggestions. Preview ghost text and accept it with the editor's standard Tab binding.
  • Choose independent commit-message and inline-completion models, or inherit the OpenCode server's default.

Setup

  1. Install OpenCode V2 and run it normally to start its background service.
  2. Install OpenCode AI by doomsec in VS Code.
  3. Open a trusted local project folder and select the OpenCode activity-bar icon.
  4. For inline completion, click OpenCode inline: off in the status bar, or run OpenCode: Toggle inline suggestions.

The extension discovers the existing service. It does not start, stop, upgrade, or restart it. It manages only the OpenCode terminals it creates, not ordinary shells or manually started terminals.

VSCodium users can install the same VSIX manually. This release is published to Microsoft's Marketplace only, not Open VSX.

Commit messages

Stage the changes you want to describe, then select the OpenCode action in Source Control or run OpenCode: Generate commit message with OpenCode.

The result goes into the existing Git commit box. Nothing is staged or committed automatically. Existing drafts require replacement confirmation, and edits made while generation is running are preserved. Staging changes during a request discards the stale result.

The staged diff is limited to 64 KiB. Known credential files are rejected, and Git external diff/text-conversion programs are not run.

Inline completion

Inline requests are disabled by default. Enabling them sends bounded code around the cursor to your configured OpenCode model and may incur model usage costs. Known credential files and Git internals are excluded.

Requests are debounced and canceled when superseded. Responses for changed documents or cursor positions are discarded. Nothing is inserted until you accept a suggestion. IntelliSense selections are extended using their native replacement ranges.

Use OpenCode: Select inline-completion model to choose a fast model. Commit drafts use OpenCode: Select commit-message model. These preferences stay in VS Code settings and do not change global OpenCode configuration.

OpenCode's current one-shot API uses the server's base configuration. Per-request token limits are not exposed by that API. The extension bounds context and response size and applies request timeouts, but model billing and generation limits remain controlled by OpenCode and its provider.

Settings

Setting Default Purpose
opencode.executable opencode Executable name or absolute path, without shell arguments.
opencode.terminal.reuse ask Initial one-time Reuse/New setup; saves the selected behavior.
opencode.commit.model null Inherit OpenCode's default, or use { "providerID": "…", "id": "…", "variant": "…" }.
opencode.inline.model null Independent optional inline model reference.
opencode.inline.enabled false Opt in to automatic suggestions.

Privacy and limitations

The extension has no analytics. Generation uses OpenCode's stateless text endpoint without tools or session-history entries. Authentication remains in the extension host, never in the sidebar webview.

This version targets local filesystem workspaces and the local OpenCode V2 service. It is not a browser extension or a client for external remote OpenCode servers. Project switching uses the editor's normal unsaved-file safeguards. Canonical /private projects are hidden from the project list without deleting them; their sessions remain available.

Development

Requires Node 22.18+ for development, VS Code 1.100+, and OpenCode 2.0.23+.

npm ci
npm run typecheck
npm test
npm run build

Press F5 in this folder to run an Extension Development Host. npm run verify:ai runs disposable Git, OpenCode, and VSCodium fixtures with a local model stub, not paid models. It does not change the shared service or reset the macOS Keychain.

Attribution

The logo and pixel-loader artwork are adapted from OpenCode under its MIT license. OpenCode AI is maintained independently and is not affiliated with or endorsed by the OpenCode team. Third-party notices are included in the extension package.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft