當 claude remote-control 找不到 claude.ai 登入資訊時,Claude Code 就會顯示這個錯誤。請執行 claude auth login,選擇 claude.ai 選項,然後再試一次。
如果還是無法解決,通常是環境中的 API key 或 token 蓋過了你的登入。如果你想直接從 iPhone 連到 Mac 的終端機,Macky 可以做到。
這個錯誤的意思
官方文件中的錯誤訊息長這樣:
Error: You must be logged in to use Remote Control.
Remote Control is only available with claude.ai subscriptions.Remote Control 只能搭配 claude.ai 登入使用。如果你已登出,或是透過 Console 或 API key 登入,指令就會以這個錯誤結束。
方法 1:使用 claude.ai 登入
在終端機執行:
claude auth login系統詢問登入方式時,選擇 claude.ai 選項。你也可以先啟動 claude,然後在工作階段中輸入 /login。完成後,再執行一次 claude remote-control。
方法 2:移除會覆蓋登入的憑證
有些憑證的優先順序高於你的登入。請先檢查你的 shell:
env | grep ANTHROPIC接著依序檢查以下項目:
- ANTHROPIC_API_KEY 或 ANTHROPIC_AUTH_TOKEN: 從 shell 環境以及任何 Claude Code 設定檔的
env區塊中移除。若只要處理目前的 shell,請使用unset ANTHROPIC_API_KEY。 - ANTHROPIC_BASE_URL: 如果主機不是 api.anthropic.com,會阻擋 Remote Control。請取消設定這個變數。
- setup-token 登入: 由
claude setup-token或CLAUDE_CODE_OAUTH_TOKEN取得的 token 只涵蓋模型請求。請執行claude auth login進行完整登入。
透過企業版 Claude apps gateway 登入也會阻擋 Remote Control。
用 iPhone 查看 Claude Code
Macky 能把你 Mac 的終端機放到 iPhone 上,採端到端加密,而且不需要開放任何連接埠。你可以在 Mac 上開啟終端機並執行 claude,然後用手機查看輸出並回覆。其他行動裝置選項請參考 在 iPhone 上使用 Claude Code。

檢查版本與方案
Remote Control 需要 Claude Code v2.1.238 或更新版本。請執行 claude --version,如果版本較舊就更新。在 Team 和 Enterprise 方案中,Owner 必須在管理設定中開啟 Remote Control 開關。
其他 Remote Control 錯誤
以下這些訊息看起來很像,但對應的問題不同:
| 訊息 | 可能的解法 |
|---|---|
Remote Control requires a claude.ai subscription. | 你已登出。請執行 claude auth login。 |
Remote Control requires claude.ai subscription auth. | 正在使用 API key 或 token。請將其移除。 |
Remote Control requires a full-scope login token | 請把 setup-token 登入換成 claude auth login。 |
Failed to create remote session. Try running /login and signing in with a claude.ai account (not Console). | 在使用 --remote 和 & 時會出現。請使用 claude.ai 帳號登入。 |
Error: Remote Control is not yet enabled for your account. | 請參考 Claude Code Remote Control 無法運作?。 |
如需設定基本步驟和限制,請閱讀 Claude Code Remote Control。
常見問題
如何從遠端連線到 Claude Code?
在你的 Mac 上開啟終端機,執行 claude remote-control。你需要 Claude Code v2.1.238 或更新版本,以及 claude.ai 登入。接著在手機上的 Claude app 開啟該工作階段。
如何在 Mac 上允許使用 Remote Control?
將 Claude Code 更新到 v2.1.238 或更新版本,然後選擇 claude.ai 選項,執行 claude auth login 登入。接著執行 claude remote-control。如果你使用 Team 或 Enterprise 方案,需要先由 Owner 在管理設定中開啟 Remote Control 開關。
Remote Control 可以搭配 API key 使用嗎?
不行。不支援 API key 和 Bedrock 驗證。有使用者以 Bedrock 憑證執行 claude remote-control,也遇到相同的登入錯誤。
setup-token 登入可以用於 Remote Control 嗎?
可以。由 claude setup-token 或 CLAUDE_CODE_OAUTH_TOKEN 取得的 token 只能用於模型請求,無法啟動 Remote Control 工作階段。請執行 claude auth login 取得完整登入。