codex - 💡(How to fix) Fix Codex Desktop (MacOS) disconnects during closed-lid mobile hotspot use despite “Prevent sleep while running”

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
RAW_BUFFERClick to expand / collapse

What version of the Codex App are you using (From “About Codex” dialog)?

Codex Desktop Version 26.429.61741 (2429). I have also seen this across multiple prior Codex versions.

What subscription do you have?

Pro $100

What platform is your computer?

macOS 26.5 Beta (25F5058e). Darwin 25.5.0 arm64 arm.

What issue are you seeing?

Codex disconnects while running when the Mac is connected via mobile hotspot and the lid is closed, even when Codex's Prevent sleep while running setting is enabled.

I have also tried using Amphetamine to keep the device awake, including disabling display sleep, and kept the mobile hotspot physically near the Mac. Codex still disconnects.

I appreciate that macOS may impose limits around closed-lid sleep / clamshell behaviour. However, from a user perspective the Codex setting implies that long-running Codex work should be protected from sleep-related interruption where possible. At minimum, Codex should appear to handle this transition more gracefully: pause, retry, resume, or clearly explain that closed-lid mobile-hotspot operation is not supported.

What steps can reproduce the bug?

  1. Open Codex Desktop on macOS 26.5 Beta (25F5058e).
  2. Ensure Prevent sleep while running is enabled.
  3. Connect the Mac to the internet via mobile hotspot.
  4. Start a Codex task that is expected to run for several minutes.
  5. Close the MacBook lid while the task is still running.
  6. Leave the Mac closed for several minutes while the mobile hotspot remains nearby and active.
  7. Reopen the MacBook.
  8. Observe that Codex has disconnected / lost the active run.

I can reproduce this even when using Amphetamine to try to keep the Mac awake.

What is the expected behavior?

One of the following:

  1. Codex successfully prevents the Mac from sleeping while a task is running, if that is technically possible on macOS in this configuration; or
  2. Codex detects that the system is about to sleep / has lost network connectivity and safely pauses the run, then retries or resumes when the Mac wakes and the network returns; or
  3. Codex clearly documents / warns that Prevent sleep while running does not apply to closed-lid MacBook use, mobile hotspot transitions, or this macOS power state.

In any case, a long-running Codex task should not silently disconnect without a recoverable path.

Codex disconnects after the lid is closed while connected to a mobile hotspot. The active Codex run is interrupted.

The issue occurs despite:

  • Codex Prevent sleep while running being enabled.

  • Mobile hotspot remaining nearby.

  • Amphetamine being used to try to keep the Mac awake.

  • Display sleep being disabled in Amphetamine.

Additional information

This appears related to sleep/network transition handling rather than a simple Wi-Fi range problem.

There is an adjacent issue about request failures after a Mac sleeps and loses Wi-Fi, but this report is specifically about the Codex Desktop app's Prevent sleep while running behaviour in a closed-lid + mobile hotspot setup.

I am happy to provide logs. I can also run a structured reproduction script that records:

  • pmset sleep/wake assertions
  • system sleep/wake events
  • network reachability during the test
  • timestamps for lid close / reopen / Codex disconnect
  • Codex app logs if you can advise the preferred log location

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING