remoteControlAtStartup: true silently fails due to feature flag race condition

Resolved 💬 2 comments Opened Mar 3, 2026 by GiamoE Closed Mar 31, 2026

Bug Description

remoteControlAtStartup: true in ~/.claude/settings.json does not reliably auto-start Remote Control. Running /rc manually in the same session works fine.

Root Cause

From analyzing the binary (v2.1.63), the startup flow has a race condition:

  1. Initial state correctly reads the setting:

``js
replBridgeEnabled: NRT() // returns true from config ✓
``

  1. But the bridge component gates on a statsig feature flag:

``js
if (!Ai() || !R) return null // Ai() checks "tengu_ccr_bridge" flag
``

  1. If the statsig flag hasn't loaded yet when the bridge component first renders, it returns null and the bridge silently never starts — even though the config value is true.
  1. Running /rc manually later works because by that time the feature flag has resolved.

Steps to Reproduce

  1. Set "remoteControlAtStartup": true in ~/.claude/settings.json
  2. Start a new Claude Code session (claude)
  3. Check phone/Claude app — session does NOT appear
  4. Run /rc in the session — session now appears on phone

Expected Behavior

Remote Control should auto-connect when remoteControlAtStartup: true is set, regardless of feature flag loading timing.

Suggested Fix

The bridge component should retry/re-evaluate after the feature flag resolves, rather than silently returning null on first render. For example:

  • Subscribe to feature flag changes and re-trigger bridge initialization when Ai() becomes true
  • Or add a short delay/retry mechanism for the initial bridge setup

Environment

  • Claude Code version: 2.1.63
  • OS: macOS (Darwin 24.5.0, Apple Silicon)
  • Plan: Max
  • Auth: claude.ai OAuth
  • Setting location: ~/.claude/settings.json

View original on GitHub ↗

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