Desktop app hangs on Thinking indefinitely on macOS; forcing external codex fixes it
What version of the Codex App are you using (From “About Codex” dialog)?
26.305.950 (863)
What subscription do you have?
Not sure
What platform is your computer?
Darwin 25.3.0 arm64 arm
What issue are you seeing?
Codex Desktop on macOS can get stuck on Thinking indefinitely, even in a brand-new thread, while codex in the terminal works normally on the same machine, same account, and same proxy/network setup.
In my case, the Desktop app initializes its local app-server and accepts the turn, but no result ever comes back to the UI.
Relevant behavior from logs:
stdio_transport_spawned ... executablePath=/Applications/Codex.app/Contents/Resources/codexCodex CLI initializedthread/startturn/start- later:
Failed to generate thread title errorMessage="Timed out waiting for structured result."
In an earlier run I also saw:
Worker exited code=1
Important workaround:<br>If I force Codex Desktop to use my external CLI binary and then restart the app, the problem disappears immediately.
I used:
launchctl setenv CODEX_CLI_PATH /opt/homebrew/bin/codex
launchctl setenv HTTP_PROXY http://127.0.0.1:7897
launchctl setenv HTTPS_PROXY http://127.0.0.1:7897
launchctl setenv ALL_PROXY http://127.0.0.1:7897
After restart, logs show:
stdio_transport_spawned ... executablePath=/opt/homebrew/bin/codex
and Desktop starts working normally again.
This makes it look like a Desktop/bundled-worker/app-server issue rather than an account issue.
Related issue: CLI-3726
What steps can reproduce the bug?
- Use Codex Desktop on macOS in an environment where the CLI works normally.
- Start a brand-new thread in the Desktop app.
- Observe that the UI stays on
Thinkingindefinitely and no response appears. - Check logs and note that Desktop spawned the bundled worker:
- As a workaround, set
CODEX_CLI_PATHto an external workingcodexbinary and restart the Desktop app. - Observe that the issue disappears and logs now show:
- bundled worker:
codex-cli 0.108.0-alpha.12 - external CLI:
codex-cli 0.111.0
What is the expected behavior?
Codex Desktop should complete responses normally with its bundled worker on macOS, without hanging forever on Thinking, and without requiring CODEX_CLI_PATH to point to an external codex binary.
Additional information
Additional context:
- Same machine
- Same account
- Same general network/proxy path
- CLI works
- Desktop fails only when it uses the bundled worker
- Desktop works again when forced to use the external newer CLI binary
This suggests one of the following:
- the bundled Desktop worker is too old or incompatible
- Desktop is not propagating the right GUI environment / network context to the bundled worker
- Desktop should fail more explicitly instead of hanging forever on
Thinking
If helpful, I can provide more log snippets.
6 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Thanks a lot — this worked for me too.
I had the same macOS issue where Codex App / VSCode would hang on prompts. After applying your workaround and restarting, both came back to normal.
Really appreciate you posting this.
Works for me as well! thanks.
Same symptom on macOS 26.5 with Codex Desktop 26.602.30954 — and importantly, the
CODEX_CLI_PATHworkaround does not fix it here.Root cause from the app-server log DB: every
thread/startemitsWARN unknown feature key in config: thread_tools, after which the turn never starts (UI: "Unable to send message / Loading…").I string-checked three app-server builds for
thread_tools:0.137.0→ not present0.137.0-alpha.4→ not present0.138.0-alpha.4→ not presentSo pointing
CODEX_CLI_PATHat any currently-published CLI still stalls, because none implementthread_tools. The CLI itself is fully healthy (codex execcompletes a turn;codex doctor= 0 fail). Looks like the 26.602 desktop client injects a feature flag that no released app-server understands — a client↔app-server version skew.Repro:
thread/startrequest_ide05ef332-8989-4da5-b102-3e4bf5314b3b; installation_idc6b6c580-d1d3-4314-a172-63965b51e0eb. Related: #13869.I got a question before applying the changes:
Will it affect Codex Mobile? I think Codex Mobile (on ChatGPT iOS) is using two different protocols. The default account based is purely on ChatGPT account/Codex Desktop sync. The ssh-based is purely on Codex terminal. The ssh-based Codex Mobile can conflict with Codex Desktop when new messages are sent in different ways.
Adding a current macOS data point because this is still happening on a much newer Codex Desktop build, and the impact is severe for heavy daily use.
I am a very heavy Codex Desktop user. The failure mode is not just "the model is slow": after I send a prompt, the UI can remain at
Thinkingfor a long time with no visible tool/action progress and no useful indication of what Codex is waiting on. In practice it looks idle from the user's point of view. Interrupting/resuming often makes the session responsive again, which makes this feel like a stalled turn/state-machine/streaming problem rather than legitimate long-running reasoning.Current environment
26.623.819054598com.openai.codexcodex-cli 0.142.5Darwin 24.6.0 arm64 arm15.6.1(24G90)149.0.7827.197~/Applications/Codex.app/Contents/Resources/codex app-server --analytics-default-enabledlaunchctlproxy / override env at time of collection: noHTTP_PROXY,HTTPS_PROXY,ALL_PROXY, orCODEX_CLI_PATHsetObserved behavior
Thinking.This is especially damaging because the user cannot distinguish:
Local diagnostic signals
I queried the local Codex log DB in read-only mode and did not upload raw session JSONL because it contains private prompts and workspace data.
Local DB summary:
~/.codex/logs_2.sqlite2026-06-23 10:16:42to2026-07-03 09:53:17local time103476WARN:929ERROR:26codex_core::responses_retrywarnings:9across7distinct threadscodex_protocol::openai_modelswarnings:31across31distinct threadsRepresentative warning pattern, redacted to avoid private prompt/workspace disclosure:
I specifically checked the
thread_toolshypothesis mentioned above. On this machine I did not findWARN/ERRORrows containingthread_tools; matches were only query echo / TRACE or DEBUG rows from this investigation. So this may share the same user-visible symptom as earlier version-skew reports but not the exact same local signature.There were also repeated
codex_models_manager::manager401 token_invalidatederrors on2026-06-30from an olderclient_version=0.142.2, but I do not want to over-attribute the currentThinkingstalls to that older auth event because current Codex Desktop is26.623.81905/0.142.5and is generally able to process turns.Expected behavior
Thinkingshould never be an unbounded opaque state.If Codex is still doing useful work, the Desktop UI should expose a reliable progress reason, for example:
If no progress has occurred for a threshold, Codex should have a watchdog that surfaces a recoverable error and captures enough telemetry for the team to diagnose the stuck state.
Why I think this should be prioritized
This is a reliability issue, not a cosmetic UI issue. For a coding agent, an indefinitely opaque
Thinkingstate breaks user trust: the user does not know whether to wait, interrupt, restart, or risk corrupting/losing the current turn state.There are already multiple related reports across Desktop surfaces, including:
Please treat this as a high-priority Desktop/app-server reliability bug. I am happy to provide redacted local log excerpts or private session/thread identifiers if there is a secure path to share them without exposing prompts or repository contents.