Skip to content

VSCode plugin broken #49992

Closed
Closed

Description

@deftmp2-svg

Description

On start it use
opencode --port 16955
and error:
ERROR
Unrecognized flag: --port in command opencode
but correct syntax is
opencode serve --port 16955

Plugins

opencode

OpenCode version

opencode v2.0.10

Steps to reproduce

  1. Install opencode & vscode plugin
  2. Use button with black square on white "Open opencode in another tab"
  3. Opened terminal with command and error

Screenshot and/or share link

No response

Operating System

Windows 11

Terminal

Windows Terminal

Activity

  1. qabRieL99 commented on Sep 21, 2026

    @qabRieL99

    Same, probably due to --port arg.

  2. qiushifelix commented on Sep 27, 2026

    @qiushifelix

    Open opencode via vscode plugin: Unrecognized flag: --port in command opencode

  3. peakiqofficial commented on Sep 29, 2026

    @peakiqofficial

    OpenCode Downgrade

    Alternative Solution: Downgrade OpenCode CLI

    The current OpenCode CLI version (v2.0.18) is not compatible with the VS Code extension because the extension is passing the unsupported --port flag.

    As an alternative, we can downgrade OpenCode CLI to a compatible version using the official installer:

    curl -fsSL https://opencode.ai/install | bash

    After installation, verify the OpenCode version and test the VS Code extension again.

  4. badass-techie commented on Oct 7, 2026

    @badass-techie

    OpenCode Downgrade

    Alternative Solution: Downgrade OpenCode CLI

    The current OpenCode CLI version (v2.0.18) is not compatible with the VS Code extension because the extension is passing the unsupported --port flag.

    As an alternative, we can downgrade OpenCode CLI to a compatible version using the official installer:

    curl -fsSL https://opencode.ai/install | bash

    After installation, verify the OpenCode version and test the VS Code extension again.

    which version is this "compatible version"?

  5. sbgraphic commented on Oct 8, 2026

    @sbgraphic

    Hello same issue here with opencode v2.0.24 and VS code 1.141.0 (MacOS Tahoe 26.7.1, MacStudio)

    ERROR Unrecognized flag: --port in command opencode

    Cannot find any settings to change that port… downgrade to v.1.x ? is it really the only option ?
    I tried to let "MiMo-V2.6" to review this problem and it seems to patch it:

    PATCHED! The extension now runs opencode serve --port <random> instead of the broken opencode --port <random>

    But as I'm not familiar with this extension at all I'm not sure…

    My patch made the extension run opencode serve --port <random>. In v2, serve is a headless server — it only prints "server listening" + password. The old opencode --port command used to launch the interactive TUI attached to that server directly in the terminal — that's the "traditional session" you're missing. The extension was built around that old behavior (it pushes prompts to the TUI via http://localhost:<port>/tui/append-prompt), but v2 no longer combines server + TUI in a single command.

    Bottom line: the extension is fixed (no more --port error), but v2 split the old behavior into serve (server) + opencode (TUI). For daily use, just type opencode in the terminal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions