GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — opencode serve fails immediately with generic 'ServeError' on Windows, no stack trace even at DEBUG level · Issue #43110 · anomalyco/opencode

opencode serve fails immediately with generic 'ServeError' on Windows, no stack trace even at DEBUG level #43110

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
opencode serve fails immediately with generic 'ServeError' on Windows, no stack trace even at DEBUG level#43110
Copy link
Assignees
Hona

Description

@r00tb3
r00tb3
opened on Aug 17, 2026
Issue body actions

Summary

opencode serve fails immediately on every attempt on Windows 11, with a generic error and zero diagnostic detail:

Warning: OPENCODE_SERVER_PASSWORD is not set; server is unsecured.
Error: Unexpected error

ServeError

opencode (interactive TUI mode) works completely fine on the same machine, same install, same config — this is isolated specifically to serve.

Environment

  • OS: Windows 11 Home (build 26200)
  • opencode-ai: reproduced on both 1.18.15 and 1.18.18 (latest at time of filing)
  • Install: npm install -g opencode-ai
  • Shell: tested from both Git Bash and PowerShell (Administrator), identical result

Steps to reproduce

opencode serve --port 4096

Fails immediately (well under a second after the config-loading log lines), no port ever binds.

What I've ruled out (extensive isolation testing)

  • Not port-specific — identical failure on ports 4096, 4097, 4098, 4099, and others. None were pre-bound (confirmed via netstat before each attempt).
  • Not a plugin issue — identical failure with --pure (no external plugins loaded).
  • Not a version issue — identical failure on 1.18.15 and 1.18.18.
  • Not a corrupted install — full clean npm uninstall -g opencode-ai + npm cache clean --force + fresh npm install -g opencode-ai@latest, still fails identically. Confirmed the fresh install works for everything else (opencode --version, opencode run "..." both succeed and return real model output).
  • Not config-related — identical failure with the two local config files (opencode.json, opencode.jsonc) both temporarily removed entirely (zero custom config).
  • Not the local MCP entry — identical failure with the mcp block in config disabled.
  • Not hostname/binding-specific — identical failure with --hostname 127.0.0.1 (default), --hostname 0.0.0.0, and --hostname localhost.
  • Not verbosity-related — --print-logs --log-level DEBUG and DEBUG=* env var both produce the exact same three-line output, no additional detail.

Expected behavior

opencode serve starts a headless server and binds the given port, same as it presumably does on other platforms / for other users, enabling API-based integrations (e.g. opencode-telegram-bot, which requires opencode serve to function and is currently completely blocked by this).

Actual behavior

Immediate failure with a generic wrapped error, no stack trace, no indication of what actually threw.

Additional context

Given the error is a clean, immediate return (not a hang or timeout), this looks like an exception being thrown and caught by the CLI's own generic error handler during server construction, with the real underlying error swallowed rather than surfaced. Happy to run additional diagnostics or a debug build if that would help narrow it down further — I've exhausted what's reachable from the public CLI surface.

Activity

  1. github-actions commented on Aug 17, 2026

    @github-actions
    github-actionsBot
    on Aug 17, 2026 – with GitHub Actions
    Contributor
    More actions

    This issue might be a duplicate of existing issues. Please check:

    • opencode serve: bind failures print bare "Unexpected error / ServeError" — the listen errno is never surfaced #38738: Same exact ServeError / "Unexpected error" output with no diagnostic detail — root cause analysis and proposed fix included
    • Windows: opencode web/serve listens but does not accept HTTP connections under Bun #38220: opencode web/serve on Windows failing to accept connections
    • [Bug]: opencode serve on Windows crashes with STATUS_CONTROL_C_EXIT when attached TUI sends session_interrupt or app_exit #41878: opencode serve on Windows crashing with control signal issues

    #38738 in particular describes the identical symptom (bare ServeError with no underlying errno surfaced) and includes a detailed root-cause analysis. The Windows-specific failure you're seeing may be a distinct platform issue on top of that, but it's worth reviewing before proceeding.

  2. github-actions
    assigned
    Hona
    on Aug 17, 2026
  3. github-actions commented on Oct 17, 2026

    @github-actions
    github-actionsBot
    on Oct 17, 2026 – with GitHub Actions
    Contributor
    More actions

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

  4. github-actions
    closed this as not plannedon Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @Hona
    Hona

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

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.