v0.3.0 — transport preflight
worker_preflight.sh — tells you whether it is the network or the credential, before the worker runs.
A sandboxed worker that cannot resolve DNS and one with a bad token fail in ways that read almost identically once a tool re-words the error. An unattended agent then reports the wrong cause and stops.
| Output | Exit | Meaning |
|---|---|---|
NET_DISABLED |
3 | DNS or transport failed. Not a credential problem. |
API_UNAVAILABLE |
4 | Host reachable, endpoint is not. A proxy allowlist missing this host looks exactly like this. |
NET_OK |
0 | Transport proven. |
AUTH_OK |
0 | Transport proven, then credentials accepted. |
AUTH_FAILED |
5 | Transport proven, so the credential conclusion is finally safe. |
Two rules:
- Transport probes run with credential variables cleared in the child process only. Re-injecting a known-good token before proving reachability neither distinguishes auth from DNS nor limits who can read the token.
- The auth probe runs only after transport is proven, and only when asked.
Nothing prints an environment value.
Suggested by @ooocooc in openai/codex#42402.