Skip to content
| Marketplace
Sign in
Visual Studio Code>AI>OpenCode GUI ChatNew to Visual Studio Code? Get it now.
OpenCode GUI Chat

OpenCode GUI Chat

Thuyen Nguyen

|
4 installs
| (0) | Free
General-purpose agentic AI assistant for VS Code with a native chat UI, file and shell tools, multi-workspace support, MCP integrations, reusable skills and OpenCode CLI session history.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

OpenCode GUI Chat

A general-purpose AI assistant inside Visual Studio Code.

OpenCode GUI Chat brings an agentic AI assistant into VS Code's native chat UI. Use it for coding, documentation, data analysis, research, and automation with any OpenAI-compatible endpoint (LiteLLM, DeepSeek, vLLM, Ollama, or an internal gateway). No terminal required.

VS Code

OpenCode GUI Chat

Highlights

Feature Description
Native chat UI Streaming responses with Markdown, copy controls, reasoning, and a Stop button.
Live activity Shows Thinking, Writing, and current tool status while handling a request.
Agentic tools Reads, creates, and edits files and runs shell commands after approval.
Multi-workspace Separate sessions per workspace folder, plus OpenCode CLI history.
Build / Plan / Review Choose between execution, planning, and read-only review.
Permissions Follows permission in opencode.json(c), including per-agent overrides.
Skills & agents Reuse custom workflows from .opencode/ and .claude/.
MCP Connect Azure DevOps, Jira, databases, or any MCP server.
Context meter See token usage by component and the model's remaining context.

Requirements

  • VS Code 1.80 or later.
  • An OpenAI-compatible endpoint and API key.
  • Optional: OpenCode CLI for browsing CLI session history.
  • Local MCP servers need their runtime (Node.js/npx, Python/uvx, ...).

Installation

Marketplace

  1. Open Extensions (Ctrl+Shift+X).
  2. Search for OpenCode GUI Chat.
  3. Click Install and reload if prompted.
code --install-extension thuyennv.opencode-gui-chat

VSIX

code --install-extension opencode-gui-chat-1.0.4.vsix

Or use Extensions → ... → Install from VSIX.... The OpenCode icon appears in the Activity Bar or Secondary Side Bar.

First-time setup

  1. Open a workspace folder.
  2. Press Ctrl+Alt+O (macOS: Cmd+Alt+O).
  3. Configure an endpoint using one of the options below, then select a model and send a test message.

Option 1: opencode.jsonc (recommended)

If you use the OpenCode CLI, the extension reads the same merged config:

{
  "provider": {
    "my-provider": {
      "options": {
        "baseURL": "https://litellm.example.com",
        "apiKey": "sk-...",
      },
      "models": {
        "my-model": {
          "limit": { "context": 128000, "output": 8192 },
        },
      },
    },
  },
  "model": "my-provider/my-model",
}

Global config at ~/.config/opencode/opencode.json(c) is also loaded.

Option 2: VS Code Settings

Search for opencode in Settings:

Setting Example
opencode.baseUrl https://litellm.example.com
opencode.model my-model
opencode.provider my-provider
opencode.maxTokens 8192
opencode.maxIterations 500

Option 3: Secure API key

Run OpenCode: Set API Key from the Command Palette. The key is stored in VS Code Secret Storage, not in a config file.

Usage

Toolbar

Element Purpose
Project Select the active workspace.
Chats / History Extension sessions and OpenCode CLI sessions.
Model Select a model.
Mode Build, Plan, Review, or a custom agent.
Skills Enable skills for the current session.
Context Token and context details.
Reasoning Show or hide model reasoning.
MCP Server status and reconnect.
Key Store an API key in Secret Storage.
Shortcut Action
Ctrl+Alt+O / Cmd+Alt+O Open chat
Ctrl+Alt+N / Cmd+Alt+N New session
Enter Send
Shift+Enter New line

The chat can also open in an editor group via OpenCode: Open Chat in Editor Group.

Composer syntax

Syntax Effect
/ Commands; /skill-name activates a skill.
@file Attach file contents to the context.
@skill Enable a skill for this message.
@agent Run with a specific agent.
!command Run a shell command in the workspace.
Summarize docs/requirements.md in 10 bullets.
@data/sales.csv find the 3 biggest monthly anomalies.
@src/extension.ts find bugs when no workspace is open.

Commands

Command Description
/new New chat session.
/clear Clear the current session.
/compact Summarize the conversation to free context.
/context Inspect context and token usage.
/history Browse OpenCode CLI history.
/thinking Toggle reasoning display.
/export Export the chat as Markdown.
/help List commands, skills, and agents.
/init Create or update AGENTS.md.
/review Review changes, a commit, branch, or PR.
/test Run tests and fix failures.

Custom commands load from .opencode/command/ and .claude/commands/.

Modes

Mode Access
Build Read, edit, and run commands (permission-controlled).
Plan Read and search only.
Review Read only, focused on bugs and risks.

Agents with mode: primary appear as additional modes.

Permissions

The extension applies the permission block from the merged opencode.json(c) to create, edit, bash, read, list, and grep.

Action Result
allow Run without asking.
ask Show a confirmation dialog.
deny Block the action and return an error.

For pattern rules, the last match wins. Put "*" first, then specific rules:

{
  "permission": {
    "create": "allow",
    "edit": { "*": "ask", "docs/**": "allow", "**/*.env": "deny" },
    "bash": { "*": "ask", "git *": "allow", "rm *": "deny" },
  },
}

create applies when write_file creates a new file; overwriting or editing an existing file uses edit. If create is unset, it falls back to edit.

Permissions can be overridden per agent in opencode.json or agent frontmatter:

{
  "agent": {
    "build": { "permission": { "bash": { "*": "ask", "git *": "allow" } } },
  },
}

Without a permission config, the safe defaults are create/edit/bash = ask and read operations = allow. Plan and Review are always read-only. MCP tool access is controlled by the MCP server.

Sessions and history

  • Each workspace has its own session list in Chats.
  • History shows sessions stored by the OpenCode CLI (CLI required).
  • /export saves a conversation as Markdown; /compact reduces context.

Skills, agents, and workspace instructions

Type Locations
Agent .opencode/agent/, .claude/agents/, ~/.config/opencode/agent/, ~/.claude/agents/
Skill .opencode/skill/, .claude/skills/, ~/.config/opencode/skill/, ~/.claude/skills/, ~/.agents/skills/
Command .opencode/command/, .claude/commands/, ~/.config/opencode/command/, ~/.claude/commands/

A skill is a folder containing SKILL.md. Agents and commands are Markdown files that support frontmatter such as name, description, agent, model, and permission. AGENTS.md or CLAUDE.md at the workspace root is added to the system prompt.

MCP

{
  "mcp": {
    "remote-tools": {
      "type": "remote",
      "url": "https://example.com/mcp",
      "headers": { "Authorization": "Bearer <token>" },
      "enabled": true,
    },
    "local-tools": {
      "type": "local",
      "command": ["npx", "tsx", "D:/tools/my-mcp/src/index.ts"],
      "environment": { "API_TOKEN": "<token>" },
      "enabled": true,
    },
  },
}
  • local uses stdio; remote uses Streamable HTTP.
  • Set enabled: false to disable a server.
  • Tools appear as mcp_<server>_<tool>.
  • A failing server does not block chat; use the MCP modal to reconnect.

Configuration

Configuration files are merged in order; later files win:

  1. $OPENCODE_CONFIG
  2. $OPENCODE_CONFIG_DIR/opencode.json(c)
  3. $XDG_CONFIG_HOME/opencode/opencode.json(c) (default ~/.config/opencode/)
  4. <workspace>/opencode.json(c)

API key lookup:

  1. provider.<id>.options.apiKey
  2. $XDG_DATA_HOME/opencode/auth.json (from opencode auth login)
  3. VS Code Secret Storage (Key button)

limit.context sets the context meter denominator; limit.output sets max_tokens per response (overridden by opencode.maxTokens). Use OpenCode: Show Resolved Config to inspect the merged config.

Context

Click the context meter or run /context to see the system prompt, tool schemas, messages, tool output, estimated tokens, and remaining context. Use /compact or /new when context is nearly full.

Security and privacy

  • Messages, attached files, and tool results go only to the endpoint you configure.
  • The extension has no sharing feature and does not send data to opencode.ai. Sessions are stored locally in VS Code storage.
  • share in opencode.jsonc only affects the OpenCode CLI; the extension does not use it.
  • API keys saved via OpenCode: Set API Key are protected by VS Code Secret Storage.
  • Avoid committing keys to opencode.jsonc or settings.json.
  • No telemetry or third-party analytics.

Troubleshooting

Symptom Fix
Icon missing Reload VS Code and verify the extension is enabled.
401/403 Check the API key; save it again with OpenCode: Set API Key.
404 / model not found Check model, provider, and baseURL with Show Resolved Config.
Stream interrupted Check endpoint connectivity and read the error in chat.
Empty or truncated reply Increase opencode.maxTokens or limit.output.
"Tool budget reached" Increase opencode.maxIterations, or send continue to resume.
MCP will not connect Check command/url and environment variables; try Reconnect.
Skills/agents missing Check folder locations and frontmatter; run /help.
Slow or high token use Use /compact, disable skills, or choose a smaller model.

Support

Report bugs or request features through the Q&A section on the Marketplace page. Include the extension/VS Code versions, provider and model (without the API key), the error message, and reproduction steps.


OpenCode GUI Chat — one assistant, every task.


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