Summary
@agentos-software/codex-cli@0.3.4 fails to connect to ChatGPT when used with @rivet-dev/agentos@0.2.20 / @rivet-dev/agentos-core@0.2.20. The published codex-exec WASM artifact passes Linux socket constants to the current host_net WASI ABI.
Environment
- macOS arm64, Node 25.8.1
- AgentOS / core 0.2.20, Codex CLI package 0.3.4
- Actor server/client session flow; also reproduced in a separate core VM session
- Valid ChatGPT device-login credentials, no API key
- ACP adapter from repository revision
0f2c8319f802dd31d43645eed88198522b8dc82a (software/codex/src/adapter.ts), because the separately published CLI artifact does not register an agent
Reproduction
- Install the versions above and the repository's Codex ACP adapter.
- Make the package executable and its directories traversable by the guest user. Supply a dedicated, guest-readable Codex home containing valid ChatGPT login credentials.
- Set
forced_login_method = "chatgpt" and cli_auth_credentials_store = "file" in that home's config.
- Open a Codex session and send a simple prompt.
Session creation succeeds, but the prompt fails:
stream disconnected before completion: socket error: connect(chatgpt.com:443) failed: errno 23
The runtime's errno 23 is EHOSTUNREACH. Host HTTPS, guest JavaScript HTTPS, and guest IPv4 DNS/TCP tests succeed. A fresh actor reproduces the same error.
Artifact evidence
SHA-256 of the extracted, unmodified bin/codex-exec:
fd3c6ce268e7c952dedc1aa7df637bc26d1a2b2c7a9180130bed8cf99d86b993
Disassembly immediately before call 9 <host_net.net_socket>:
10e29c: i32.const 2
10e29e: i32.const 1
10e2a0: i32.const 0
10e2a2: local.get 2
10e2a4: i32.const 48
10e2a6: i32.add
10e2a7: call 9 <host_net.net_socket>
Current repository toolchain/crates/libs/wasi-http/src/lib.rs uses AF_INET=1 and SOCK_STREAM=6. The runner's HOST_NET_AF_INET=1, HOST_NET_AF_INET6=2, and HOST_NET_SOCK_STREAM=6 agree. The published artifact still passes 2,1.
Confirmation
For diagnosis only, I verified the hash and instruction bytes, then changed the two constants to 1,6 without changing credentials, endpoint, runtime, or adapter. Two actor server/client prompts returned the requested response using the ChatGPT subscription. This is not proposed as a shipping binary patch.
Could you rebuild/publish the Codex CLI artifact from the corrected source and add an artifact-level network smoke test? It looks like the source correction exists but has not reached this published binary. I can provide a PR if the release/build path needs a change.
Summary
@agentos-software/codex-cli@0.3.4fails to connect to ChatGPT when used with@rivet-dev/agentos@0.2.20/@rivet-dev/agentos-core@0.2.20. The publishedcodex-execWASM artifact passes Linux socket constants to the current host_net WASI ABI.Environment
0f2c8319f802dd31d43645eed88198522b8dc82a(software/codex/src/adapter.ts), because the separately published CLI artifact does not register an agentReproduction
forced_login_method = "chatgpt"andcli_auth_credentials_store = "file"in that home's config.Session creation succeeds, but the prompt fails:
The runtime's errno 23 is EHOSTUNREACH. Host HTTPS, guest JavaScript HTTPS, and guest IPv4 DNS/TCP tests succeed. A fresh actor reproduces the same error.
Artifact evidence
SHA-256 of the extracted, unmodified
bin/codex-exec:Disassembly immediately before
call 9 <host_net.net_socket>:Current repository
toolchain/crates/libs/wasi-http/src/lib.rsusesAF_INET=1andSOCK_STREAM=6. The runner'sHOST_NET_AF_INET=1,HOST_NET_AF_INET6=2, andHOST_NET_SOCK_STREAM=6agree. The published artifact still passes2,1.Confirmation
For diagnosis only, I verified the hash and instruction bytes, then changed the two constants to
1,6without changing credentials, endpoint, runtime, or adapter. Two actor server/client prompts returned the requested response using the ChatGPT subscription. This is not proposed as a shipping binary patch.Could you rebuild/publish the Codex CLI artifact from the corrected source and add an artifact-level network smoke test? It looks like the source correction exists but has not reached this published binary. I can provide a PR if the release/build path needs a change.