AI & Agents

How to Run OpenCode Beside GitHub Copilot in VS Code

Learn how to run OpenCode beside GitHub Copilot in VS Code to build a productive hybrid AI development environment. This guide covers how to resolve auto-completion overlays, manage keyboard shortcut conflicts, and configure settings.json to run both extensions concurrently. Discover how to connect your terminal-based agents to Fast.io for persistent, shared workspace storage.

Fast.io Editorial Team 9 min read
Setting up OpenCode and GitHub Copilot to coexist in VS Code.

How to Run OpenCode Beside GitHub Copilot in VS Code

Developers attempting to run multiple AI coding extensions in a single editor session often experience instant keystroke conflicts, where one tool's completion menu overlays and disables the other's inline suggestion ghost text. Choosing to run OpenCode beside GitHub Copilot in Visual Studio Code is not about choosing between inline autocomplete and agentic task orchestration, but rather configuring them to run in parallel without competing for the same keystrokes. This approach avoids conflicts and improves developer speed.

Running OpenCode beside GitHub Copilot in VS Code allows developers to combine Copilot's fast inline auto-completions with OpenCode's deep terminal-based agentic workflows. When configured correctly, GitHub Copilot acts as a passive inline completion assistant that predicts the next line of code, while OpenCode functions as an active agent that handles multi-file refactoring, runs tests, and executes complex command sequences.

This coexistence requires dividing tasks based on each extension's architectural strengths. GitHub Copilot relies on visual completions that pop up directly as you type. OpenCode uses a terminal-native planning loop where the agent proposes modifications, requests authorization, and writes files directly. By separating their trigger mechanisms, you can prevent conflicts and create a unified development workspace that offers both quick inline suggestions and deep agentic control.

Steps to Adjust GitHub Copilot Configurations for Coexistence

To prevent autocomplete conflicts between VS Code extensions, you must disable the automatic trigger for one of the assistants. Letting both extensions compete to suggest inline text will cause keystroke lag and disjointed visual suggestions. The most effective strategy is to disable copilot autocomplete for opencode while keeping its manual trigger available on demand.

By default, GitHub Copilot automatically displays inline predictions as you type. You can toggle this behavior off in your user settings so that Copilot only generates code when you explicitly request it. This leaves the standard editing loop free for OpenCode to suggest commands and make modifications.

To modify this setting, open your user settings in VS Code (using the keyboard shortcut Cmd+, on macOS or Ctrl+, on Windows and Linux) and search for the Copilot autocomplete setting. Alternatively, you can add the configuration rules directly to your settings.json file. Use the following configuration block to disable automatic inline completions:

{
  "github.copilot.editor.enableAutoCompletions": false,
  "github.copilot.enable": {
    "*": true,
    "markdown": false,
    "plaintext": false
  }
}

Once automatic completions are disabled, you can trigger Copilot manually at any time by pressing Option + \ (macOS) or Alt + \ (Windows and Linux). This setup keeps Copilot out of your way until you need a quick snippet, leaving the default editing loop clear for OpenCode.

How to Manage VS Code Native Auto-Suggestion Trigger Settings

Visual Studio Code uses a built-in IntelliSense system to show standard autocomplete options for variables, classes, and language keywords. When running multiple AI coding extensions in VS Code, this native dropdown menu can conflict with both Copilot's manual trigger and OpenCode's suggestions.

To prevent the editor from aggressively showing suggestions on every keystroke, you can control when the autocomplete box appears. VS Code provides a setting called editor.suggestOnTriggerCharacters that dictates whether characters like dot (.) or parenthesis (() immediately open the suggestion dropdown. Disabling this setting forces VS Code to wait until you manually trigger the dropdown, preventing it from overlaying other AI suggestions.

You can configure these rules inside your global or workspace settings.json file. The following configuration block disables trigger-character autocompletions and narrows down quick suggestions to inline text only:

{
  "editor.suggestOnTriggerCharacters": false,
  "editor.quickSuggestions": {
    "other": "inline",
    "comments": "off",
    "strings": "off"
  }
}

Adjusting these settings ensures that the editor interface remains clean. When you need standard language auto-completions, you can manually trigger the native dropdown using Ctrl + Space. This separation gives each AI extension room to present suggestions without visual overlap.

Steps to Scope Keybindings in VS Code and Prevent Hotkey Overlaps

When running multiple extensions, keybinding conflicts are common. For example, the shortcut to accept an inline suggestion (usually Tab) might be claimed by multiple assistants. If two extensions attempt to use Tab simultaneously, the editor will default to the extension loaded first, blocking the other.

To solve this, VS Code keyboard shortcut settings allow scoping extension-specific keybindings using the when clause context. This allows you to bind a shortcut to a command only when a specific editor state is active, such as when a text box has focus or when a suggestion is visible. VS Code keeps track of the keyboard shortcuts you have customized in the keybindings.json file. For advanced customization, you can also directly modify the keybindings.json file.

To manage these shortcuts, open the Command Palette (Cmd+Shift+P on macOS or Ctrl+Shift+P on Windows/Linux) and select "Preferences: Open Keyboard Shortcuts (JSON)". This opens your custom keybindings.json file. Because OpenCode runs as a session inside the integrated terminal, you can bind one shortcut to jump to the terminal panel where OpenCode is running and a separate shortcut to trigger Copilot inline completions, using conditions like editorTextFocus and !editorReadonly to ensure they only run when editing.

Here is an example array of keyboard shortcuts for your keybindings.json file:

[
  {
    "key": "ctrl+alt+o",
    "command": "workbench.action.terminal.focus",
    "when": "editorTextFocus"
  },
  {
    "key": "option+backslash",
    "command": "editor.action.inlineSuggest.trigger",
    "when": "editorTextFocus && !editorReadonly"
  }
]

This configuration ensures that pressing Ctrl+Alt+O jumps your cursor to the terminal panel where the OpenCode agent session runs, while Option+Backslash triggers a manual Copilot suggestions query, avoiding hotkey collisions. The OpenCode IDE extension also ships its own default shortcuts for launching sessions, which you can rebind the same way if they clash with other extensions.

Fastio features

Persist OpenCode and Copilot files in a unified workspace

Give your terminal agents and team members a shared workspace with per-file version history, auto-indexing for RAG, and an MCP server. Starts with a 14-day free trial.

Connecting OpenCode to a Shared Fast.io Workspace

Once your VS Code settings and keyboard shortcuts are configured, you can connect your agentic tools to a shared workspace. While local extensions provide fast execution, developers often struggle to share agent outputs and track file history across sessions. Fast.io solves this problem by providing a persistent, cloud-based workspace designed for agentic workflows.

OpenCode is model-agnostic and supports over 75 LLM providers via Models.dev, including local models. To connect OpenCode to a Fast.io workspace, you can use the Model Context Protocol. Fast.io is MCP-native, exposing Streamable HTTP endpoints. Instead of installing local packages, you can configure OpenCode to connect to the remote Fast.io MCP server. This allows the terminal agent to read files, perform semantic search, and save output directly in the cloud workspace. Connecting OpenCode to a shared workspace allows you to coordinate with team members and other tools. You can read more about it on the Fast.io storage for agents page.

To set up this connection, configure the server details in your opencode.json file. The server authenticates every request in-band using an API key generated from the Fast.io organization settings.

Below is the configuration block to connect OpenCode to the remote Fast.io MCP endpoint:

{
  "mcpServers": {
    "fastio-workspace": {
      "url": "https://mcp.fast.io/mcp/key",
      "headers": {
        "Authorization": "Bearer fastio_sec_key_example_token_9938"
      }
    }
  }
}

Once connected, OpenCode can search files in the workspace using semantic search (enabled by Intelligence Mode), draft plans, and write code. The workspace automatically updates the per-file version history and logs every event in the append-only audit log. This setup allows developers and agents to collaborate on the same files. Creating an account is free; doing real work requires an organization on a paid subscription. Every organization starts with a 14-day free trial, which requires a credit card. Paid plans are Starter at $29/mo, Business at $99/mo, and Growth at $299/mo. For more details, visit the Fast.io pricing page.

Frequently Asked Questions

Can I use OpenCode and GitHub Copilot at the same time?

Yes, you can run OpenCode and GitHub Copilot concurrently in VS Code by separating their completion triggers. You can disable automatic inline autocompletions for Copilot and configure it to run manually on demand via keyboard shortcuts. This setup prevents the two extensions from competing for the same screen space and cursor context.

How do I prevent autocomplete conflicts between VS Code extensions?

To prevent autocomplete conflicts between VS Code extensions, you can disable automatic code completions in GitHub Copilot and turn off trigger character completions in VS Code settings. Set github.copilot.editor.enableAutoCompletions to false, and set editor.suggestOnTriggerCharacters to false. This prevents suggestions from popping up automatically on every keystroke, allowing you to trigger them manually when needed.

How do I bind OpenCode commands in VS Code?

You can bind OpenCode commands in VS Code by customizing the keybindings.json file. Open the Command Palette, run Preferences: Open Keyboard Shortcuts (JSON), and add your key combination overrides. By using when clauses like editorTextFocus, you can scope your custom shortcuts so they only trigger when your cursor is active in the text editor.

Related Resources

Fastio features

Persist OpenCode and Copilot files in a unified workspace

Give your terminal agents and team members a shared workspace with per-file version history, auto-indexing for RAG, and an MCP server. Starts with a 14-day free trial.