[BUG] remote-control WebSocket relay keeps reconnecting / commands hang indefinitely on macOS

Resolved 💬 7 comments Opened Mar 11, 2026 by thesammygit Closed May 23, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

/remote-control connects successfully and shows the session URL, but the status bar immediately switches to "Remote Control reconnecting" in a loop. Commands sent via the web UI or another CLI session get stuck in the "philosophizing / tinkering / loading" state indefinitely and never complete. Clearing socket files (sudo rm -rf /tmp/claude-501/) and disabling all plugins had no effect.

Suspected cause: claude.ai returns cf-mitigated: challenge, suggesting Cloudflare bot mitigation is interrupting the persistent WebSocket when it tries to re-establish. Remote sessions also run via the Agent SDK (Fast mode unavailable: Fast mode is not available in the Agent SDK), which may have no fallback when the relay drops mid-response.

What Should Happen?

/remote-control should maintain a stable WebSocket connection and commands sent from the web UI or mobile session should complete and return a response.

Error Messages/Logs

Steps to Reproduce

  1. Run claude in a terminal (tested on macOS Tahoe 25.3.0, Claude Code v2.1.72)
  2. Run /remote-control
  3. Session URL is displayed, status shows "Remote Control connecting…"
  4. Status bar immediately switches to "Remote Control reconnecting"
  5. Send any command from the web UI (https://claude.ai/code/session_...)
  6. Command shows loading animation forever — no response ever arrives

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.72

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗