Skip to content

[BUG] Attempting to authenticate claude-code doesn't work on FIrefox/OSX because only listens on IPV6 localhost #16521

Description

@pszabop

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Setup

macOS Monterey 12.x, Intel x86
Firefox browser
Claude Code native binary (Homebrew install)

Description

When attempting to authenticate claude-code via the email route
Bug: CLI binds to IPv6 only (::1), not IPv4 (127.0.0.1)
Firefox tries IPv4 first for localhost, fails to reach callback server

Workaround

Switching to Chrome via copy/paste fixed it

Root cause verification

Verified with curl -v http://127.0.0.1:PORT/ (connection refused) vs curl -v http://[::1]:PORT/ (works)

What Should Happen?

Claude Code should be authenticate

Error Messages/Logs

Steps to Reproduce

Install claude-code via homebrew or curl method onto OSX
Firefox the default browser
Attempt to authenticate the user in claude-code
It'll either hang or give an Oauth error when you enter the 6 digit code

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.0.76

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:authbugSomething isn't workinghas reproHas detailed reproduction stepsplatform:macosIssue specifically occurs on macOSstaleIssue is inactive

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions