-
Notifications
You must be signed in to change notification settings - Fork 0
Troubleshooting
The daemon failed to find a usable camera.
- Check the camera is not in use by another app (Zoom, FaceTime, etc.)
- Verify camera permission:
System Settings → Privacy & Security → Camera → Terminal.appshould be allowed - Test the camera directly:
python3 -c "import cv2; cap = cv2.VideoCapture(0); print(cap.read()[0]); cap.release()" - If you have multiple cameras, try hardcoding: add
CORTEX_CAPTURE__DEVICE_ID=0(or1,2) to.env
The virtual environment is not activated or the package is not installed:
source .venv/bin/activate
pip install -e "./cortex[dev]"Check the log output for the specific error. Common causes:
- Missing
.envfile:cp cortex/.env.example .env - Invalid LLM config: set
CORTEX_LLM__FALLBACK_MODE=rule_basedto keep running with a deterministic plan when no provider can be reached - Missing storage directory:
python -m cortex.scripts.seed_config --root .
Cortex automatically skips Continuity Camera (iPhone/iPad) and verifies each camera by name before accepting it.
- Restart the daemon after turning off your iPhone — camera selection runs once at startup
- If it still picks wrong: set
CORTEX_CAPTURE__DEVICE_ID=0in.env(or try1,2) - Debug what cameras are visible:
python3 -c " from cortex.services.capture_service.webcam import _list_macos_video_device_names print(_list_macos_video_device_names()) "
- If launched from the browser extension: grant camera to Terminal.app in
System Settings → Privacy & Security → Camera - If launched from iTerm or another terminal: grant camera to that app instead
- Do NOT reset all camera permissions with
tccutil reset Camera— this clears camera access for every app on your Mac (Zoom, FaceTime, etc.)
pkill -f "cortex.scripts.run_dev"If that doesn't work:
lsof -ti tcp:9473 | xargs kill -9- Run the installer:
python -m cortex.scripts.install_native_host - Fully restart your browser (Cmd+Q, then reopen) — reloading the extension tab is not enough
- Native messaging manifests are only read at browser startup
The daemon is not running. Click Start Cortex or run cortex-dev from your terminal.
- Check Terminal.app has Accessibility permission:
System Settings → Privacy & Security → Accessibility - Check the Terminal window for the actual error message
This should not happen — the extension uses a fixed manifest key for a deterministic ID. If it does change, re-run python -m cortex.scripts.install_native_host and restart the browser.
The extension uses a multi-layer kill chain:
- WebSocket
SHUTDOWNmessage -
POST /shutdownHTTP request - Wait 1 second
-
lsofport scan +pgrepprocess search → SIGTERM - Wait 3 seconds → SIGKILL survivors
If the stop button fails once, click it again. If the camera light stays on after two attempts:
pkill -f "cortex.scripts.run_dev"Cortex talks to Claude through the Anthropic SDK. Pick exactly one transport via CORTEX_LLM__PROVIDER:
- Verify
CORTEX_LLM__PROVIDERis one ofbedrock,vertex, ordirect.
Bedrock (default). Confirm the bearer token is in Keychain and the region is set:
security find-generic-password -s cortex.bedrock -a bearer_token
# CORTEX_LLM__BEDROCK__AWS_REGION must be set in .env (e.g. us-east-2)If you opt out of Keychain with CORTEX_LLM__USE_KEYCHAIN=false, export AWS_BEARER_TOKEN_BEDROCK into the daemon's environment instead.
Vertex. Re-run the gcloud application-default login flow:
gcloud auth application-default loginThe Anthropic SDK reads the resulting credentials automatically.
Direct Anthropic API. Confirm ANTHROPIC_API_KEY is exported into the daemon's environment (the daemon does not read it from Keychain in direct mode).
Fallback. CORTEX_LLM__FALLBACK_MODE=rule_based (the default) keeps the daemon working with a deterministic rule-based plan when every provider is unavailable. Set it explicitly if you want to test without any LLM at all.
See Setup for the full per-provider configuration.
- Improve lighting — face should be evenly lit, no strong backlight
- Reduce movement — large head movements corrupt the rPPG signal
- The system falls back to telemetry-only mode when signal quality is low (this is normal behavior, not an error)
- Check signal quality at
GET /status/current— if physio quality is < 0.5, the system is in telemetry-only mode with stricter thresholds - Run calibration:
cortex-calibrate --duration 120 - Verify the daemon is receiving webcam frames:
cortex-capture # should show video with face detection overlay
- Run calibration (population defaults may not match your baseline)
- Increase the entry threshold in
.env:CORTEX_STATE__ENTRY_THRESHOLD=0.30 - Check if another app is causing rapid window switching (browser auto-refresh, notifications)
pip install --force-reinstall mediapipeVerify you're using native ARM Python (not Rosetta):
python3 -c "import platform; print(platform.machine())"
# Should print: arm64Add your terminal app to: System Settings → Privacy & Security → Input Monitoring
The daemon will start without input monitoring but mouse/keyboard telemetry will be unavailable (state classification uses webcam-only mode).
python3 -c "
import cv2
for i in range(4):
cap = cv2.VideoCapture(i)
print(f'Device {i}: opened={cap.isOpened()}')
cap.release()
"- Verify the VS Code extension is installed and activated (check the status bar for the Cortex indicator)
- The extension connects via WebSocket to
ws://127.0.0.1:9473— check the daemon is running - Try reloading the VS Code window:
Cmd+Shift+P → Reload Window
macOS Gatekeeper is blocking the app because it was downloaded from the internet:
xattr -cr /Applications/Cortex.appThe dashboard window may be hidden. Check the system tray for the Cortex icon and click it, or try relaunching the app.
Grant camera permission to Cortex.app: System Settings -> Privacy & Security -> Camera -> Cortex should be allowed. If it does not appear in the list, open the app once so macOS registers the permission request.
Click the Connect Chrome/Edge button in the desktop app. It copies the install command to your clipboard and opens a terminal window. Follow the clipboard instructions, then fully restart your browser (Cmd+Q, reopen).
Daemon logs are written to stdout. To save them:
cortex-dev 2>&1 | tee ~/cortex.logSet log level in .env:
CORTEX_LOGGING__LEVEL=DEBUG # verbose
CORTEX_LOGGING__LEVEL=INFO # default
CORTEX_LOGGING__LEVEL=WARNING # quiet