Reference
check-env
Check that the React Native development environment is ready for testing. The
workflow reads rn_session(action="status") first, then uses passive
cdp_status and device_list as diagnostic context. It never creates authority
from an ambient port or the first available device.
/rn-dev-agent:check-envWhat Gets Checked
Section titled “What Gets Checked”| Subsystem | What it checks | Source |
|---|---|---|
| Source declaration | Whether a non-Git app root declares its source identity before setup or build | RN_DEV_AGENT_DECLARED_ROOT and RN_DEV_AGENT_DECLARED_MANIFESTS in the supervisor environment |
| Session | Ready state, worktree, app, platform, device, Metro, and migration readiness | rn_session(action="status") |
| Metro | Allocated and bound port for this session | rn_session, then passive cdp_status |
| CDP | Whether the exact authority-bound Hermes target is connected | rn_session, then passive cdp_status |
| Device inventory | Available devices for diagnosis only | device_list |
Common Fixes
Section titled “Common Fixes”| Status | Suggested fix |
|---|---|
NON_GIT_MANIFEST_REQUIRED | Export RN_DEV_AGENT_DECLARED_ROOT and RN_DEV_AGENT_DECLARED_MANIFESTS for the non-Git app root, then restart the supervisor. See parallel session authority |
Session state: blocked | Stop and follow recoveryRequirement.nextAction; do not run setup or bind another device. See parallel session authority. |
| Session missing or genuinely unbound | Run setup, review/apply the integration preview, and bind the intended device and app |
| Metro not found | Use literal pnpm ios or pnpm android through the confirmed integration |
| No Hermes target | Open the bound app, then call cdp_connect for the exact signed target |
| CDP code 1006 | Close React Native DevTools, Flipper, or Chrome DevTools |
cdp_component_tree reports RedBox | Run /rn-dev-agent:debug-screen |
| Narrow gated CDP read times out | Check for a blocked JS thread, then use cdp_reload |
HELPERS_NOT_INJECTED | Read bounded meta.helperHealth; use a __DEV__ Hermes build and retry through the gated tool after reload |
| No devices | Boot a simulator: xcrun simctl boot "iPhone 16" |
When to Use
Section titled “When to Use”- Before starting a feature development session
- When other commands report connection issues
- After restarting Metro or the simulator