語言
November 1, 2026閱讀約 3 分鐘

Claude Code Remote Control 已被佔用:如何修正

這個錯誤代表該資料夾的 Remote Control 已經被其他東西佔用。可能是另一個 claude remote-control 正在執行,也可能是 Claude 桌面版 App 正在服務這個資料夾,或是已停止的伺服器還沒釋放它的註冊。

停止另一個伺服器、在桌面版 App 中關閉 Remote Control,或等待約 3 分鐘。如果你人不在電腦前,需要查看狀況,可以用 Macky 把 Mac 的終端機帶到 iPhone 上。

錯誤代表什麼

當第二個請求打到同一個資料夾時,伺服器會回傳 HTTP 409。Remote Control 每台機器、每個資料夾只會註冊一個環境。你可能會看到以下兩種訊息之一。

終端機版本:

Error: This folder is already served by a terminal `claude remote-control` on this device. Stop it first.

桌面版 App 版本:

Error: This folder is already served by the Claude app on this device. Turn Remote Control off for it there first.

有些設定會在前面加上 Registration: Failed with status 409 這段文字,原因相同。

修正 1:在桌面版 App 中關閉 Remote Control

打開 Claude 桌面版 App,前往 Settings > Claude Code > Remote Control。關閉該資料夾的 Remote Control,或從清單中移除該資料夾。接著再執行一次 claude remote-control。

有一則回報指出,在這種情況下重新開機 Mac 並無法清除錯誤。

修正 2:停止另一個終端機伺服器

找找看其他終端機分頁、tmux 工作階段或背景工作中,是否還有另一個 claude remote-control。可以用以下指令找出來:

pgrep -fl "claude remote-control"

用 kill <pid> 停止它,或在它所在的終端機按 Ctrl+C。--continue 錯誤也會列出程序,例如 pid 538599。

修正 3:等待過期的註冊釋放

如果沒有其他程序在執行,已停止或當機的伺服器可能還佔用著該資料夾。根據回報,通常需要等約 3 分鐘,另一個案例則是 1 到 3 分鐘。等待之後再重新啟動。

這種情況常出現在當機、systemd 強制終止或 launchd 重新啟動之後。

用 iPhone 清除阻擋的程序

你離開座位時,Mac 可能仍佔用著該資料夾。Macky 讓你在 iPhone 上使用 Mac 的終端機,採端到端加密,且不需要開放連接埠。

在手機上執行上面的 pgrep 指令,並停止多餘的程序。然後不必走回 Mac,就能重新啟動 claude remote-control。

其他已回報的原因

殘留的第二個執行個體也可能導致 --session-id 無法接續你想要的工作階段。兩個帳號可以服務同一個儲存庫,但同一個帳號不能對同一個資料夾佔用兩次。

長時間執行設定的自動恢復

如果你使用會自動重試的監控程式,例如 KeepAlive 設定或 while true 迴圈,註冊釋放後它會自行恢復。社群工具 claude-rc-keeper 和 claude-rc-keepalive 可以自動處理等待。Anthropic 並不認可這些工具。

更多手機使用方式,請見 Claude Code on iPhone and Mobile。

常見問題

Can Claude Code be controlled remotely?

可以。Remote Control 讓你從手機、平板或瀏覽器接續本機的 Claude Code 工作階段。工作階段會繼續在你的電腦上執行。

How to continue a Claude Code session remotely?

在專案資料夾執行 claude remote-control,接著從 claude.ai/code 或 Claude 行動版 App 連線。設定步驟請見 Claude Code Remote Control: Setup, Limits and Fixes。

Why isn't Remote Control working in Claude Code?

「already served」錯誤只是其中一種原因。另一個終端機或 Claude 桌面版 App 已經佔用該資料夾。更多錯誤請見 Claude Code Remote Control Not Working? Every Error and Fix。

Why does Claude Code Remote Control disconnect?

本頁只說明「already served」錯誤。如需了解斷線原因,請見 not-working guide。

試用 Macky

用你的 iPhone 連接到 Mac 的終端機。