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
{{ message }}
Repository navigation
CLI: web and serve show generic error message when the port is already in use #46263
Thank you for updating the issue! It now includes a clear description, steps to reproduce, a screenshot, your OpenCode version, OS, and terminal info. Everything looks good — the needs:compliance label has been removed.
Related (Windows-specific, different root cause): #51899 — same bare Unexpected error / ServeError, but in my case the port is held by an orphaned socket whose owning PID no longer exists (netstat shows a LISTENING entry, tasklist shows no such process), so there is no listener to kill and only a reboot clears it. Includes a raw TcpListener bind test proving the WSAEADDRINUSE, plus a suggestion to detect and report this state explicitly.
Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.
Activity
github-actions commentedon Aug 30, 2026
This issue doesn't fully meet our contributing guidelines.
What needs to be fixed:
Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
opencode servebind failures print bare "Unexpected error / ServeError" — the listen errno is never surfaced (same root cause: port-in-use errors show a generic, unhelpful message)listen()errno toEADDRINUSEIf you believe this was flagged incorrectly, please let a maintainer know.
github-actions commentedon Aug 30, 2026
Thank you for updating the issue! It now includes a clear description, steps to reproduce, a screenshot, your OpenCode version, OS, and terminal info. Everything looks good — the needs:compliance label has been removed.
ling9ling7 commentedon Sep 28, 2026
Related (Windows-specific, different root cause): #51899 — same bare
Unexpected error / ServeError, but in my case the port is held by an orphaned socket whose owning PID no longer exists (netstatshows a LISTENING entry,tasklistshows no such process), so there is no listener to kill and only a reboot clears it. Includes a rawTcpListenerbind test proving the WSAEADDRINUSE, plus a suggestion to detect and report this state explicitly.thdxr commentedon Oct 11, 2026
Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (
opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊