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:
- Initial state correctly reads the setting:
``js``
replBridgeEnabled: NRT() // returns true from config ✓
- But the bridge component gates on a statsig feature flag:
``js``
if (!Ai() || !R) return null // Ai() checks "tengu_ccr_bridge" flag
- If the statsig flag hasn't loaded yet when the bridge component first renders, it returns
nulland the bridge silently never starts — even though the config value istrue.
- Running
/rcmanually later works because by that time the feature flag has resolved.
Steps to Reproduce
- Set
"remoteControlAtStartup": truein~/.claude/settings.json - Start a new Claude Code session (
claude) - Check phone/Claude app — session does NOT appear
- Run
/rcin 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()becomestrue - 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
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗