[BUG] OAuth port 54545 conflicts with macOS mobileactivationd and unable to change ports
Status Fixed / completed
Maintainer reply ✓ Yes — ant-kurt
Workaround ✓ Mentioned in thread ↓
Activity 13 comments · opened Jun 25, 2025 · closed Aug 25, 2025
💡 Likely answer: A maintainer (ant-kurt, collaborator)
responded on this thread — see the highlighted reply below.
Environment
- Platform (select one):
- [X] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other: <!-- specify -->
- Claude CLI version: 1.0.34 (Claude Code)
- Operating System: macOS 15.3.1
- Terminal: MacOS default Terminal
Bug Description
When I run Claude from the terminal, it takes me through the setup and when I once I've selected a login method, it tells me that the port 54545 is already in use.
The process that's using that port is a Mac process so I'm unable to change the port that uses and there is no port configuration that I can find for claude.
So I'm unable to use claude at all.
Steps to Reproduce
Step 1 - Dark Mode
Step 2 - Select Login Method - I select "Claude account with subscription"
Expected Behavior
Explained above
Actual Behavior
Prevented from using claude due to a port conflict.
Additional Context
I ran "lsof -i :54545" and it reports that "mobileactivationd" is occupying the port.
13 Comments
Is there a way to configure the port that claude code uses for this?
any solution ?
reboot the machine solved my problem
I create a docker image and started Claude up in that image to workaround this issue but it is just a workaround. I mapped local folders in to the container so that I could share results.
It would be far easier to be able to configure the port to allow us to solve the issue when we encounter it.
FWIW - I was able to workaround this issue by opening Activity Monitor and Force Quitting
mobileactivationdUpdate to sequoia 15.5 fix this for me
I'm running into the same error and the above solutions haven't worked for me.
mobileactivationdStrangely, running
lsof -i :54545yields no results 🤔Same problem, and killing mobileactivationd did not fix it.
Closing Claude desktop client + Claude code in my CLI solved it. Then I was able to complete the activation and login through the Claude Code extension in Cursor.
<img width="627" height="120" alt="Image" src="https://github.com/user-attachments/assets/ffe62ac2-22ad-4658-ad60-f0ce11a3a2d5" />
Well, I took no further steps and just tried it again today after a week, and its suddenly working! 🤷♂️
For me it was a 2nd VSCode app open connected via remote ssh tunnel and was port forward that port from trying to connect that instance's Claude Code. I did not proceed with that instance and it just remained forwarded in VSCode's PORTS tab.
This should be working better in the upcoming release!
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.