Skip to content

VS Code extension fails to start with --port parameter - outputs {} #18714

Description

@gslvly

Description

When opening the OpenCode VS Code extension, it runs:

opencode --port 29138

This outputs only {} and the server doesn't start properly.

Steps to Reproduce

  1. Run opencode --port 29138
  2. Observe output: {}

Expected Behavior

The server should start in server mode and listen on the specified port.

Actual Behavior

The TUI tries to start alongside the server, causing a conflict. From the debug logs:

ERROR service=default error=[object Object] tui bootstrap failed
{}

Workaround

Using opencode serve --port 29138 works correctly:

opencode server listening on http://127.0.0.1:29138

Environment

  • OpenCode version: 1.3.0
  • Platform: macOS (darwin)
  • Installed via: npm

Suggestion

When --port is specified, OpenCode should automatically run in server mode (like opencode serve) rather than trying to start the TUI. Alternatively, the VS Code extension should use opencode serve --port {port} instead.

Activity

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

Metadata

Metadata

Assignees

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