Language
November 2, 20263 min read

Claude Code Remote Control and ANTHROPIC_BASE_URL Error (2026)

Claude Code Remote Control won't start when ANTHROPIC_BASE_URL points at any host other than api.anthropic.com. Unset the variable, or run claude remote-control in a shell without it, and the error goes away.

This happens even when you're signed in with claude.ai. If you need a custom endpoint for your regular sessions, Macky puts your Mac's terminal on your iPhone so you can keep working from there.

The Error and What Causes It

The message names the setting that routed your session away from the Anthropic API. With a custom base URL it reads:

Error: Remote Control is only available when using Claude via api.anthropic.com. ANTHROPIC_BASE_URL is set and does not point at api.anthropic.com, so this session is using a custom endpoint

The full message goes on to tell you to unset the variable or run in a shell without it. The official docs say a gateway or proxy triggers this. Anthropic-compatible third-party proxies fall into the same group.

How to Fix It

First, check whether the variable is set in your current shell:

echo $ANTHROPIC_BASE_URL

If it prints a URL, unset it and start Remote Control:

unset ANTHROPIC_BASE_URL claude remote-control

For a one-off run that leaves your shell alone, use env:

env -u ANTHROPIC_BASE_URL claude remote-control

If the error comes back in every new terminal, something sets the variable at startup. Search your shell profiles:

grep -n ANTHROPIC_BASE_URL ~/.zshrc ~/.zprofile ~/.bash_profile

Move the export out of the profile and set it only in the sessions that need the proxy. Wrapper tools can also override it. One documented case is the caveman tool. Its maintainer says caveman claude remote-control now detects the subcommand and launches without the override.

Don't bother with _CLAUDE_CODE_ASSUME_FIRST_PARTY_BASE_URL. The error text says it does not apply to Remote Control.

Keep Your Proxy Setup and Still Reach Your Mac

Remote Control is tied to api.anthropic.com, so a proxy-based setup can't use it. Macky gives you your Mac's terminal on your iPhone instead.

Macky's terminal screenshot on an iPhone, showing a shell on the Mac.

Open a shell on your Mac from your phone and run claude with whatever environment you normally use. The connection is end-to-end encrypted and needs no open ports. Closed-lid access works too, so the Mac can stay in a bag or on a shelf.

Other Setups That Block Remote Control

A custom base URL isn't the only thing that blocks Remote Control. According to the docs, these setups also fail:

  • Other providers: Amazon Bedrock, Google Cloud's Agent Platform, and Microsoft Foundry are not available.
  • API keys: not supported. You need a claude.ai login.
  • Plan: Pro, Max, or Ultra.
  • Team and Enterprise: supported once an Owner enables the Remote Control toggle in admin settings.
  • Network: Remote Control needs access to the Anthropic API on port 443.

You'll see "Remote Control requires a claude.ai subscription." when you're signed out. The same message appears when an API key or token is in use.

Related Fixes

For other errors, see Claude Code Remote Control Not Working? Every Error and Fix. To use Claude Code from your phone another way, read Claude Code on iPhone and Mobile.

FAQ

How do I set up Claude Code Remote Control?

Run claude remote-control in a shell where ANTHROPIC_BASE_URL is unset. You need a claude.ai login on a supported plan. The full setup is in Claude Code Remote Control: Setup, Limits and Fixes.

Does _CLAUDE_CODE_ASSUME_FIRST_PARTY_BASE_URL fix the error?

No. The error text says _CLAUDE_CODE_ASSUME_FIRST_PARTY_BASE_URL does not apply to Remote Control. Unset ANTHROPIC_BASE_URL instead.

Can I use Remote Control with an API key?

No. The docs say API keys are not supported. Remote Control needs a claude.ai login on a supported plan. When an API key or token is in use, the message reads "Remote Control requires a claude.ai subscription."

Does Remote Control work with Bedrock or Foundry?

No. The docs list Amazon Bedrock, Google Cloud's Agent Platform, and Microsoft Foundry as unavailable for Remote Control.

Try Macky

Connect to your Mac terminal from your iPhone.