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
OAuth callback server binds to IPv6, breaking WSL2 localhost forwarding #30013
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.).
I hit a similar WSL2 loopback bug once. Since your repro already pins binding to , I'd compare three things first: a plain manual diff of the callback host the Windows browser actually reaches, authproxy.dev if you want to watch the handoff live, or OAuth Redirect Doctor if you want the callback host, loopback listener, and provider redirect lined up. tbh WSL2 usually falls over when the browser can hit localhost but the OAuth listener is only sitting on IPv6.
Activity
mertcanvural commentedon May 31, 2026
I hit a similar WSL2 loopback bug once. Since your repro already pins binding to , I'd compare three things first: a plain manual diff of the callback host the Windows browser actually reaches, authproxy.dev if you want to watch the handoff live, or OAuth Redirect Doctor if you want the callback host, loopback listener, and provider redirect lined up. tbh WSL2 usually falls over when the browser can hit localhost but the OAuth listener is only sitting on IPv6.
billovfo commentedon May 31, 2026
Thank you guys