Skip to content

OAuth callback server binds to IPv6, breaking WSL2 localhost forwarding #30013

@billovfo

Description

@billovfo

Description

The OAuth callback server in packages/opencode/src/mcp/oauth-callback.ts:164
calls server.listen(port) without a host, which binds to :: (IPv6) on Linux.
WSL2's localhost forwarding cannot route to IPv6 dual-stack sockets, so OAuth
callbacks from the Windows browser never reach OpenCode.

Plugins

No response

OpenCode version

Latest

Steps to reproduce

server!.listen(currentPort, '0.0.0.0', () => {

All OAuth-based remote MCP servers on WSL2 (Notion, etc.).

Screenshot and/or share link

No response

Operating System

Windows 11 pro (WSL 2, Ubuntu)

Terminal

WSL Ubuntu Tmus

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions