Documentation Index
Fetch the complete documentation index at: https://docs.runlayer.com/llms.txt
Use this file to discover all available pages before exploring further.
Common Authentication Errors
Detect scans use organization API keys (created in Settings → API Keys with the Detect Scan role). Auto-provisioning (hooks, sync) uses enrollment keys (created in Settings → Enrollment Keys).| HTTP Status | Error | Cause | Resolution |
|---|---|---|---|
| 401 | Missing/invalid API key | Key is incorrect, revoked, or missing | Verify the organization API key (Detect) or enrollment key (auto-provisioning) in your script |
| 403 | Forbidden | API key lacks required role | Ensure the org key has the Detect Scan role |
| 500 | Server error | Internal server issue | Contact Runlayer support |
Interpreting Discovery Results
User appears in the Shadow report for MCP servers they say they never used
User appears in the Shadow report for MCP servers they say they never used
- Project-level config in a cloned repo. A
.cursor/mcp.json,.vscode/mcp.json,.mcp.json,.codex/config.toml, or similar checked into a shared repo is discovered on every developer who clones it. The config is attributed to the OS user who ran the scan on that machine. - Stale or experimental config. The user added the server to a client config file once (e.g. trying it out, copy-pasting from a blog), never invoked it, and forgot it was still there.
- Shared device. Another OS account on the same workstation configured the MCP, but the scan ran under a different OS account that resolves to this Runlayer user.
- Username resolution mismatch. Tiered matching (email, identity attribute, local-part, name pattern) can link a device’s OS username to the wrong Runlayer user. Fix via Settings → Shadow MCPs → Unresolved Usernames and then re-analyze.
- Click the user in the Shadow page to open the audit log filtered to
shadow_mcp_detectedfor that user. - Each event includes the device hostname, device id, the MCP server’s
command/args/url, and any project paths where the config was found. - If a project path is listed, the discovery came from a project-level config file. Open that repo and inspect the checked-in MCP config to confirm.
- If no project path is listed, the discovery came from a global client config. On the listed device, inspect the relevant client config (e.g.
~/Library/Application Support/Claude/claude_desktop_config.json,~/.cursor/mcp.json,~/.codex/config.toml). - To clear the discovery, remove the entry from the offending config file (or uninstall the project) and the next scan will drop it from the inventory.
Common Issues
Script not running on macOS
Script not running on macOS
- Check script permissions:
chmod +x run-ai-watch-macos.sh - Verify the script is assigned to the correct device group in your MDM
- Check MDM console for script execution errors
- Review logs at
/var/log/runlayer/ai_watch_detect.log
Script not running on Windows
Script not running on Windows
- Ensure PowerShell execution policy allows the script
- Run
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUserif needed - Verify the script is assigned to the correct device group in your MDM
- Review logs at
%ProgramData%\Runlayer\ai_watch_detect.log
No devices appearing in dashboard
No devices appearing in dashboard
- Check script logs for errors (see Log Locations below)
- Verify the API key is active and not revoked — org API key in Settings > API Keys (Detect) or enrollment key in Settings > Enrollment Keys (auto-provisioning)
- Confirm network connectivity from devices to your Runlayer host
- Check that the script is actually being executed by your MDM
- Verify the Runlayer API is reachable from device networks
Config written but scan fails
Config written but scan fails
- Check that
uvis properly installed and in the system PATH - Review verbose output with
runlayer scan --verbose - Ensure no firewall rules are blocking the Runlayer API
- Verify the organization API key has the Detect Scan role
Scan fails behind a corporate TLS inspection proxy
Scan fails behind a corporate TLS inspection proxy
- Prefer installing the corporate root CA into the OS trust store through MDM. The CLI and MDM-deployed
aiwatchbinary will trust it automatically. - For debugging or one-off deployments, pass a PEM bundle explicitly:
- For scripted deployments, set
RUNLAYER_CA_BUNDLE. The CLI also honorsSSL_CERT_FILEandREQUESTS_CA_BUNDLEas fallbacks. - Ask the security team to exempt the Runlayer tenant hostname from TLS inspection, such as
*.runlayer.comor customer-managed hostnames likerunlayer.dev.company.comjust like they do for other security products like endpoint detection and response (EDR).
runlayer: command not found after install
runlayer: command not found after install
uv tool install runlayer places the binary in ~/.local/bin (macOS/Linux) or %USERPROFILE%\.local\bin (Windows), which may not be in your shell’s PATH yet.Resolution:- Restart your terminal (new shells pick up the updated PATH)
- Or run
uv tool update-shellto add~/.local/binto your shell profile, thenexec $SHELL -l(or open a new terminal) - Verify:
which runlayer(macOS/Linux) orwhere runlayer(Windows)
Enforce hooks don't fire or silently fail
Enforce hooks don't fire or silently fail
runlayer on PATH at hook runtime. On macOS, GUI clients launched from the Dock or Spotlight inherit an environment that often does not include ~/.local/bin; terminal clients such as Claude Code and Codex need the shell PATH to include the Runlayer CLI.Resolution:- Install the CLI with
uv tool install runlayer(notuvx runlayer ...) so the binary is permanently on disk - Verify from a terminal launched the same way your editor launches:
command -v runlayer - On macOS, if the editor still can’t find the CLI, set the PATH for GUI apps:
Then log out and log back in, or reboot
- Alternatively, restart Cursor, Claude Code, or Codex from a terminal where
runlayeris on PATH
Verify which CLI a hook will use
Verify which CLI a hook will use
runlayer binary the hook script will find at runtime:runlayer first, then falls back to uvx. If neither is found, enforcement hooks deny all calls and observational hooks silently exit.Users see macOS consent dialogs for runlayer-scan
Users see macOS consent dialogs for runlayer-scan
runlayer-scan for directories like Desktop, Documents, or Downloads.Cause: The PPPC profile was not deployed before the MDM script ran, so macOS falls back to interactive consent prompts. This can also happen if a device is not enrolled via User-Approved MDM or Automated Device Enrollment.Resolution:- Deploy the PPPC profile via your MDM — download it from Settings → Shadow MCPs → View configuration on your Detect configuration
- The PPPC profile overrides any previously denied permissions, so re-deploying it will restore access even if a user clicked “Don’t Allow”
- Ensure devices are enrolled via User-Approved MDM or Automated Device Enrollment (required for MDM-managed PPPC profiles to take effect)
- Verify the profile is installed:
profiles show -type configuration | grep -i runlayer - Re-run the scan after the profile is applied
Scan finds fewer MCP servers than expected (macOS)
Scan finds fewer MCP servers than expected (macOS)
- Deploy the PPPC profile to grant Full Disk Access to the wrapper binary
- Ensure devices are enrolled via User-Approved MDM or Automated Device Enrollment
- Verify the profile is installed:
profiles show -type configuration | grep runlayer - Verify the wrapper binary is installed and signed correctly:
- Re-run the scan after the PPPC profile is applied
LaunchAgent fails to load or trigger
LaunchAgent fails to load or trigger
- Check LaunchAgent logs:
cat /tmp/runlayer-scan.stderr.log - Verify the LaunchAgent is loaded:
launchctl list | grep runlayer - Check the main log:
cat /var/log/runlayer/ai_watch_detect.log - Verify the wrapper binary exists and is signed:
- Test the wrapper binary:
/usr/local/bin/runlayer-scan --dry-run - Try manually triggering:
launchctl kickstart -kp gui/$(id -u)/com.runlayer.scan
'Scan process may not have started properly' warning
'Scan process may not have started properly' warning
- Check if the scan actually ran by reviewing the logs:
- Verify the LaunchAgent is properly loaded:
launchctl list | grep runlayer - Check system load — high CPU usage can delay process startup
- Manually trigger the scan to test:
launchctl kickstart -kp gui/$(id -u)/com.runlayer.scan - If the issue persists, check Console.app for launchd errors related to
com.runlayer.scan
Log Locations
| Platform | Feature | Log Location |
|---|---|---|
| macOS | Detect | /var/log/runlayer/ai_watch_detect.log |
| macOS | Enforce | /var/log/runlayer/ai_watch_enforce.log |
| macOS (fallback) | Detect | /tmp/runlayer-ai_watch_detect.log |
| macOS (fallback) | Enforce | /tmp/runlayer-ai_watch_enforce.log |
| macOS | Auto-provisioning | /var/log/runlayer/auto_provisioning.log |
| macOS | LaunchAgent | /tmp/runlayer-scan.stdout.log, /tmp/runlayer-scan.stderr.log |
| Windows | Detect | %ProgramData%\Runlayer\ai_watch_detect.log |
| Windows | Auto-provisioning | %ProgramData%\Runlayer\auto_provisioning.log |
| Windows | Intune | C:\ProgramData\Microsoft\IntuneManagementExtension\Logs |
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | General failure (no user logged in, missing config) |
| 2 | Network failure |
| 3 | Installation failure |
Verifying PPPC Profile Deployment (macOS)
After deploying the PPPC profile, verify it’s installed on target devices:Verifying Wrapper Binary (macOS)
Verify the wrapper binary is properly installed and signed:Identifier=com.runlayer.scan which matches the PPPC profile.
Getting Help
If you continue to experience issues:- Collect the relevant log files from the affected device
- Note the HTTP status codes and error messages
- Contact Runlayer support with the collected information