You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Activity
qabRieL99 commentedon Sep 21, 2026
Same, probably due to
--portarg.qiushifelix commentedon Sep 27, 2026
Open opencode via vscode plugin: Unrecognized flag: --port in command opencode
peakiqofficial commentedon Sep 29, 2026
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.
badass-techie commentedon Oct 7, 2026
which version is this "compatible version"?
sbgraphic commentedon Oct 8, 2026
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 opencodeCannot 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.