fix(daemon-client): name the Codex sandbox fix in the loopback-denied hint
Merged
TH
1d ago+117+117+012345678901234567890123456789-40-40-01234567890123456789
Summary
Codex’s macOS sandbox can deny localhost access. The generic hint left agents to figure out how to retry. Both denial reasons now use the captured client environment to select a Codex hint when CODEX_SANDBOX is nonempty. The hint explains standalone calls, the permanent allow rule, and one-time escalation. The rules path follows CODEX_HOME when set. The generic hint and lifecycle behavior are unchanged.
Before / after
codex sandbox -- node bin/agent-device.mjs devices --state-dir <temp>previously suggested generic host access. It now prints the Codex rule, standalone retry instructions, and full setup URL on both a denied listen and a denied connect to a running daemon.- The same CLI call on the host exited 0 and listed 17 devices.
Validation
- Head
2d7f5639ff84f28a6d35abcbf3f520c05ec09c46: oxlint passed on the resolver file after a doc comment edit. - At
830c6c52be, 30 tests passed across the two focused files. - At
fc1a4a3bec, frozen install and build passed, reason regeneration produced no diff, and the live checks below passed. - Codex 0.172.0 exposed
CODEX_SANDBOX=seatbeltin the sandbox. With a temporaryCODEX_HOMEand an explicit/usr/bin/envallow rule, Luna low ran it standalone andCODEX_SANDBOXwas absent. - Luna medium, workspace-write, and a temporary rule for the built CLI path. In 3/3 final runs,
cd … && agent-device devicesprinted the new hint and the very next call ran agent-device standalone and exited 0. - Test daemons stopped and temporary files removed. Repository-wide validation is pending in CI.
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.