docs(agent-setup): explain running agent-device under the Codex sandbox

Merged
TH
2d ago
+14-0

Summary

Document how to run agent-device outside the macOS Codex sandbox using a per-command rule. Cover pinning the binary path, issuing standalone commands, and recognizing daemon-connect-denied.

Validation

Head 3242734119d2937ddad58c6b6792a48100263f77. Verified the permission-error classification against origin/main. git diff --check passed. CI owns repository validation. This docs-only edit needs no device or project runtime suite.

Prior head e17d83a044f01054e7ab085fe884b76a783b81a1 passed pnpm format and the following experiments.

  • Codex CLI 0.172.0 on macOS 27.0 returned EPERM for loopback TCP and Unix sockets under the workspace, ~/.agent-device, and $TMPDIR with default settings or explicit network_access=false. With network_access=true, all four connected. With networking off and --allow-unix-socket for the workspace socket, only that socket connected.
  • With a host daemon already running, agent-device 0.21.45 session list --json reported daemon-connect-denied with networking off and succeeded with networking on.
  • codex execpolicy check returned allow for agent-device snapshot -i and agent-device press @e4-s123, including with a pinned path. cd app and pwd had no explicit match. Codex splits both compound examples and requires an explicit allow for every segment to bypass the sandbox. Codex policy source

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.