When Your AI Tool Won't Cooperate
I've been trying to connect my phone to Codex on my Mac for weeks. The idea was simple: let Codex keep working on my development tasks while I step away, then check in and give new commands from my phone. But every attempt hit the same wall—a red error message on my Mac: "Unable to enable remote control. Please try again."
I tried everything you'd think of: logging in and out, restarting, updating, checking account permissions. I even asked another AI assistant for help, but nothing stuck. I started to believe the feature just wasn't meant to work in my setup.
A Wild Idea: Let the AI Fix Itself
Then it hit me. The problem was with ChatGPT and Codex, so why not ask ChatGPT to solve its own problem? I took screenshots of the phone and desktop interfaces, sent them over, and typed a simple command: "Connect my desktop to my phone."
That one sentence kicked off a debugging session that felt less like tech support and more like a partnership. I clicked buttons, captured screens, and ran terminal commands. ChatGPT analyzed the screenshots, read logs, proposed tests, and refined its guesses based on what I fed back. It wasn't a one-shot answer. It was a conversation that kept narrowing down the possibilities.
The Usual Suspects: Account, Workspace, Version
First, we ruled out the obvious. My phone and Mac were on the same ChatGPT account, and both were in the same Workspace. That wasn't the issue. Then I noticed a desktop update: my version was 26.803.61601, and there was a newer one, 26.810.50856. I upgraded, hoping it was a known bug. No luck—the same red text appeared.
Digging Into the Logs
Next, we went straight to the official logs. Codex stores them at ~/Library/Logs/com.openai.codex/YYYY/MM/DD. We searched for remote control entries and found something telling:
method=remoteControl/enable errorCode=null refresh_remote_control_started refresh_remote_control_completed nextConnectionCount=0 previousConnectionCount=0 creationFailureCount=0
No error code, and the remote control module seemed to start fine, but the connection count stayed at zero. That pointed away from the feature itself and toward something lower-level, like networking.
The Proxy Problem
Here's the catch: my Mac needs a proxy to reach ChatGPT. The system proxy was set to localhost on ports 33210 (HTTP/HTTPS) and 33211 (SOCKS). Everything worked—ChatGPT, Codex, all of it—so I assumed the network was fine. But a desktop app can have multiple network paths. The main app might use the proxy, but a background connection might not inherit it.
We ran two quick tests. First, a direct curl to chatgpt.com without a proxy timed out:
curl -I --connect-timeout 10 https://chatgpt.com
Then with the proxy specified, it connected immediately:
curl -I --proxy http://127.0.0.1:33210 --connect-timeout 10 https://chatgpt.com
That was the smoking gun. The remote control's background connection wasn't picking up the system proxy.
The Fix: Inject Proxy Environment Variables
We decided to test the fix by launching Codex with explicit proxy environment variables. After quitting Codex completely, I ran:
export HTTP_PROXY=http://127.0.0.1:33210
export HTTPS_PROXY=http://127.0.0.1:33210
export ALL_PROXY=socks5://127.0.0.1:33211
open -a "Codex"
Then I went back to Settings → Connections → Control This Mac, clicked Allow, and voilà—it worked. My phone finally connected to Codex.
Making It Stick: A Custom Launcher
But typing those exports every time was a pain. So I built a tiny AppleScript app that waits 8 seconds for the proxy to start, then opens Codex with the right environment. Here's the command:
osacompile -o "$HOME/Applications/Codex-Proxy-Launcher.app" -e 'delay 8' -e 'do shell script "export HTTP_PROXY=http://127.0.0.1:33210; export HTTPS_PROXY=http://127.0.0.1:33210; export ALL_PROXY=socks://127.0.0.1:33211; /usr/bin/open -a Codex"'
Then I added it to Login Items and kept it in the Dock. When I need to restart Codex, I quit it and click the launcher. It's clean and reversible—just remove it from Login Items and delete the app.
What I Learned About Human-AI Collaboration
This experience changed how I think about troubleshooting. The real win wasn't just fixing the connection. It was seeing how ChatGPT could diagnose its own ecosystem when given real-time feedback. I provided the context; it provided the reasoning. We built a chain of evidence that led to the root cause.
It wasn't perfect—we hit dead ends and wrong guesses. But the key was persistence. ChatGPT kept refining its approach based on what I sent back, and we eventually nailed it.
Your Turn: A Checklist for Similar Issues
If you're stuck with Codex remote control, here's what to check:
- Are you on the same account and Workspace on both devices?
- Is your Codex version up to date?
- Do you need a proxy to reach ChatGPT? If so, test with and without it.
- Check the logs for
remoteControl/enableand connection counts. - Try launching Codex with explicit proxy variables.
It might feel odd to ask an AI to fix itself, but it's a surprisingly effective method. As AI tools dig deeper into our systems, they're learning to diagnose their own problems. And that's a skill worth tapping into.
Comments (0)
Please sign in to post a comment.
Don't have an account? Create one
No comments yet. Be the first to comment!