Inconsistent localhost access across approved command prefixes can silently invalidate debugging
Summary
When one localhost-touching command prefix has already been approved for escalated execution, and another script has not, Codex can end up running two similar debugging commands with different effective localhost/network access in the same session. That difference was not surfaced clearly enough in the UX, and it led to a long false debugging path against application code that was not actually broken.
What happened
In one session, a benchmark script could reach my local dev server successfully, while other local scripts failed to connect to the same http://localhost service. The root cause was not the app code. The benchmark command had an already-approved elevated prefix, while the other scripts were still running in the restricted sandbox.
From the user perspective, this was not obvious. I saw generic execution approvals, but not a clear distinction that one script was now effectively outside the sandbox while another similar script was still inside it.
Why this is harmful
- It creates false negatives against the user's code.
- It can waste hours of debugging on the wrong layer.
- The assistant can produce confident but invalid conclusions because mixed-permission results are being compared as if they were equivalent.
Repro
- Start a local dev server on
http://localhost. - Approve one localhost-touching command prefix for escalated execution.
- In the same session, run that approved command and a different localhost-touching script that does not share the approved prefix.
- One command can reach host localhost, while the other may still be blocked by sandbox/network restrictions.
- The difference is easy to miss, and the assistant may continue debugging the app instead of identifying the permission mismatch.
Expected
- Codex should make the effective execution context much more obvious for localhost-sensitive commands.
- If two commands in the same debugging flow are running with different localhost/network access, that difference should be surfaced prominently.
- Ideally, localhost debugging should not silently mix sandboxed and elevated command results without an explicit warning.
Actual
- Different scripts in the same session can end up with different effective localhost access based on prior prefix approvals.
- The UI/flow did not make that distinction explicit enough for the user.
- The result was a dead-end debugging loop caused by permission context, not application behavior.
Suggested fixes
- Show a stronger per-command indicator for sandboxed vs elevated execution, especially for localhost/network-sensitive commands.
- Warn when the assistant compares results from commands with different effective privilege/network contexts.
- Consider an explicit localhost-access classification in the approval UX so users can tell that two scripts are not running under equivalent conditions.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗