Codex gets stuck in an infinite pooling/reuse connection loop (hyper_util) when being spawned as `codex exec` from WITHIN codex
What version of Codex is running?
0.29.0
Which model were you using?
gpt-5
What platform is your computer?
Linux 6.11.0-28-generic x86_64 x86_64
What steps can reproduce the bug?
prompt to codex:
please run this command in the shell: codex exec --skip-git-repo-check "say cheeeeese!"
What is the expected behavior?
use separate connection to api.openai.com
What do you see instead?
2025-09-05T17:51:19.650153Z INFO codex_core::config: cwd not set, using current dir
[2025-09-05T17:51:19] OpenAI Codex v0.23.0 (research preview)
--------
workdir: /home/jan/tmp/codex3
model: gpt-5
provider: openai
approval: never
sandbox: danger-full-access
reasoning effort: high
reasoning summaries: detailed
--------
[2025-09-05T17:51:19] User instructions:
say cheese!
2025-09-05T17:51:19.650597Z DEBUG codex_core::codex: Configuring session: model=gpt-5; provider=ModelProviderInfo { name: "OpenAI", base_url: None, env_key: None, env_key_instructions: None, wire_api: Responses, query_params: None, http_headers: Some({"version": "0.23.0"}), env_http_headers: Some({"OpenAI-Organization": "OPENAI_ORGANIZATION", "OpenAI-Project": "OPENAI_PROJECT"}), request_max_retries: None, stream_max_retries: None, stream_idle_timeout_ms: None, requires_openai_auth: true }
2025-09-05T17:51:19.673266Z DEBUG codex_core::codex: Recording items for conversation: [Message { id: None, role: "user", content: [InputText { text: "<environment_context>\nCurrent working directory: /home/jan/tmp/codex3\nApproval policy: never\nSandbox mode: danger-full-access\nNetwork access: enabled\n</environment_context>" }] }]
2025-09-05T17:51:19.673375Z INFO codex_exec: Codex initialized with event: SessionConfiguredEvent { session_id: a24595d1-daf7-41fe-a637-3686efa79452, model: "gpt-5", history_log_id: 38317665, history_entry_count: 74 }
2025-09-05T17:51:19.673424Z INFO codex_exec: Sent prompt with event ID: 0
2025-09-05T17:51:19.673716Z DEBUG codex_core::codex: Submission sub=Submission { id: "0", op: UserInput { items: [Text { text: "say cheese!" }] } }
2025-09-05T17:51:19.673827Z DEBUG codex_core::codex: Recording items for conversation: [Message { id: None, role: "user", content: [InputText { text: "say cheese!" }] }]
2025-09-05T17:51:19.673847Z DEBUG codex_core::codex: Recording items for conversation: []
2025-09-05T17:51:19.674214Z DEBUG codex_exec: Received event: Event { id: "0", msg: TaskStarted }
2025-09-05T17:51:19.685512Z DEBUG reqwest::connect: starting new connection: https://api.openai.com/
2025-09-05T17:51:19.687786Z DEBUG hyper_util::client::legacy::connect::http: connecting to 172.66.0.243:443
2025-09-05T17:51:19.699708Z DEBUG hyper_util::client::legacy::connect::http: connected to 172.66.0.243:443
2025-09-05T17:51:19.913001Z DEBUG hyper_util::client::legacy::pool: pooling idle connection for ("https", api.openai.com)
2025-09-05T17:51:19.924728Z DEBUG hyper_util::client::legacy::pool: reuse idle connection for ("https", api.openai.com)
2025-09-05T17:51:20.103656Z DEBUG hyper_util::client::legacy::pool: pooling idle connection for ("https", api.openai.com)
2025-09-05T17:51:20.116261Z DEBUG hyper_util::client::legacy::pool: reuse idle connection for ("https", api.openai.com)
2025-09-05T17:51:20.287602Z DEBUG hyper_util::client::legacy::pool: pooling idle connection for ("https", api.openai.com)
2025-09-05T17:51:20.299694Z DEBUG hyper_util::client::legacy::pool: reuse idle connection for ("https", api.openai.com)
2025-09-05T17:51:20.476642Z DEBUG hyper_util::client::legacy::pool: pooling idle connection for ("https", api.openai.com)
2025-09-05T17:51:20.488887Z DEBUG hyper_util::client::legacy::pool: reuse idle connection for ("https", api.openai.com)
2025-09-05T17:51:20.656085Z DEBUG hyper_util::client::legacy::pool: pooling idle connection for ("https", api.openai.com)
2025-09-05T17:51:20.667741Z DEBUG hyper_util::client::legacy::pool: reuse idle connection for ("https", api.openai.com)
2025-09-05T17:51:20.830828Z DEBUG hyper_util::client::legacy::pool: pooling idle connection for ("https", api.openai.com)
2025-09-05T17:51:20.842837Z DEBUG hyper_util::client::legacy::pool: reuse idle connection for ("https", api.openai.com)
2025-09-05T17:51:21.010313Z DEBUG hyper_util::client::legacy::pool: pooling idle connection for ("https", api.openai.com)
2025-09-05T17:51:21.022155Z DEBUG hyper_util::client::legacy::pool: reuse idle connection for ("https", api.openai.com)
2025-09-05T17:51:21.203919Z DEBUG hyper_util::client::legacy::pool: pooling idle connection for ("https", api.openai.com)
2025-09-05T17:51:21.216155Z DEBUG hyper_util::client::legacy::pool: reuse idle connection for ("https", api.openai.com)
2025-09-05T17:51:21.378153Z DEBUG hyper_util::client::legacy::pool: pooling idle connection for ("https", api.openai.com)
2025-09-05T17:51:21.389883Z DEBUG hyper_util::client::legacy::pool: reuse idle connection for ("https", api.openai.com)
2025-09-05T17:51:21.648549Z DEBUG reqwest::connect: starting new connection: https://api.openai.com/
2025-09-05T17:51:21.648794Z DEBUG hyper_util::client::legacy::pool: reuse idle connection for ("https", api.openai.com)
2025-09-05T17:51:21.650954Z DEBUG hyper_util::client::legacy::connect::http: connecting to 162.159.140.245:443
2025-09-05T17:51:21.665848Z DEBUG hyper_util::client::legacy::connect::http: connected to 162.159.140.245:443
2025-09-05T17:51:21.684739Z DEBUG hyper_util::client::legacy::pool: pooling idle connection for ("https", api.openai.com)
2025-09-05T17:51:21.819569Z DEBUG hyper_util::client::legacy::pool: pooling idle connection for ("https", api.openai.com)
2025-09-05T17:51:21.831930Z DEBUG hyper_util::client::legacy::pool: reuse idle connection for ("https", api.openai.com)
2025-09-05T17:51:22.006232Z DEBUG hyper_util::client::legacy::pool: pooling idle connection for ("https", api.openai.com)
2025-09-05T17:51:22.017808Z DEBUG hyper_util::client::legacy::pool: reuse idle connection for ("https", api.openai.com)
2025-09-05T17:51:22.185848Z DEBUG hyper_util::client::legacy::pool: pooling idle connection for ("https", api.openai.com)
2025-09-05T17:51:22.197328Z DEBUG hyper_util::client::legacy::pool: reuse idle connection for ("https", api.openai.com)
2025-09-05T17:51:22.378963Z DEBUG hyper_util::client::legacy::pool: pooling idle connection for ("https", api.openai.com)
2025-09-05T17:51:22.390723Z DEBUG hyper_util::client::legacy::pool: reuse idle connection for ("https", api.openai.com)
2025-09-05T17:51:22.580821Z DEBUG hyper_util::client::legacy::pool: pooling idle connection for ("https", api.openai.com)
2025-09-05T17:51:22.592292Z DEBUG hyper_util::client::legacy::pool: reuse idle connection for ("https", api.openai.com)
2025-09-05T17:51:22.755007Z DEBUG hyper_util::client::legacy::pool: pooling idle connection for ("https", api.openai.com)
2025-09-05T17:51:22.766323Z DEBUG hyper_util::client::legacy::pool: reuse idle connection for ("https", api.openai.com)
2025-09-05T17:51:22.929338Z DEBUG hyper_util::client::legacy::pool: pooling idle connection for ("https", api.openai.com)
2025-09-05T17:51:22.940652Z DEBUG hyper_util::client::legacy::pool: reuse idle connection for ("https", api.openai.com)
2025-09-05T17:51:23.101625Z DEBUG hyper_util::client::legacy::pool: pooling idle connection for ("https", api.openai.com)
2025-09-05T17:51:23.113486Z DEBUG hyper_util::client::legacy::pool: reuse idle connection for ("https", api.openai.com)
2025-09-05T17:51:23.273777Z DEBUG hyper_util::client::legacy::pool: pooling idle connection for ("https", api.openai.com)
2025-09-05T17:51:23.285219Z DEBUG hyper_util::client::legacy::pool: reuse idle connection for ("https", api.openai.com)
Additional information
_No response_
2 Comments
I can't repro this. This may be a one-off. Feel free to reopen with a reliably repro if there is one. Make sure you're on the latest Codex release as well.
I ran into the same problem, but the reason was related to my firewall settings. If codex cannot access "8.47.69.6" (chatgpt.com ), then it just freezes without an error log or something like that.