This morning I grabbed my phone to kick off a few Claude Code sessions, the way I do every day. Nothing worked. Remote Control was dead.
Fixed upstream. My PR #58 is merged and shipping in teamclaude v1.1.1 — the /v1/code/* passthrough is now the default, so Remote Control survives account rotation out of the box. No manual patch anymore. Running in production.
Remote Control is my favorite Claude Code feature. I drive Claude from my phone close to half the time: start a task from bed, check on it from a cafe, steer it while I’m nowhere near my desk. When it stopped connecting, my whole workflow went with it.
The latest Claude Code update (2.1.196) added a gate. Remote Control works only if your session talks straight to api.anthropic.com. Set a custom ANTHROPIC_BASE_URL to route through a proxy or gateway, and Remote Control refuses to connect.
I get why Anthropic did it. It blocks distillation and abuse: they don’t want people pulling Claude through gateways to clone or resell it. Fair enough.
And no, I’m not distilling Opus into a knockoff model. I run a proxy for a boring reason: I need observability, precise context management and accounts rotation.
Almost every popular proxy works the same way: it swaps base_url. LiteLLM, ccflare, claude-code-router all point ANTHROPIC_BASE_URL at themselves and forward from there. Every one of them now breaks Remote Control, because base_url substitution is the exact thing the new gate kills.
If swapping base_url is off the table, one option survives: a transparent man-in-the-middle forward proxy. It leaves ANTHROPIC_BASE_URL untouched so the gate never trips, and intercepts the traffic through HTTPS_PROXY and a locally-trusted CA instead.
Don’t write that yourself. I found teamclaude (by @MagicalTux / Karpelès Lab), which already ships MITM forward-proxy mode and multi-account rotation out of the box.
teamclaude got me past the gate. Then I hit a second bug.
Remote Control runs its own control channel under /v1/code/*, bound to the one account your session is paired with. With more than one account on the proxy, teamclaude rewrites the auth header on every request to api.anthropic.com, including that control channel. It injects a rotated account’s token onto a channel that accepts only the paired one, and the server rejects the worker event stream with a 403.
The symptom throws you off: Remote Control connects for a split second, then drops with Transport closed: server rejected connection (code 403). The triggers and presence calls survive the rewrite and come back 200. The streaming worker/events/stream does not, and that stream is the one that keeps Remote Control alive.
Small patch: pass /v1/code/* through untouched, the same way the OAuth token endpoint already is. Remote Control then uses your own paired credential while inference keeps rotating across accounts. I patched both the HTTP/1.1 and HTTP/2 rewrite paths and added a test.
Everything works again. Rotation across all my accounts and Remote Control from my phone, at the same time. From there you can bolt whatever local tweaks you want onto your own teamclaude.
I opened an issue and a PR upstream so it works for everyone out of the box:
Thanks @MagicalTux for the tool. The patch makes Remote Control survive account rotation.
If you run Claude Code behind a proxy and Remote Control died on you this week, that’s why, and that’s how you get it back.