Guides

How to keep Codex running when you close your MacBook

Start with where your task runs. Check Codex settings, sleep and connectivity, then decide whether a small lid gap fits your workflow.

If Codex is working with local files and tools on your MacBook, that Mac must stay awake for local execution to continue. A task running in an independent cloud environment is different. Check the execution location first. WakeClip mechanically holds a compatible MacBook lid slightly open. It does not provide a fully closed lid or replace suitable power, app and network settings.

On this page
  1. 1. Where is your Codex task running?
  2. 2. Is the display off, the screen locked or the Mac asleep?
  3. 3. Check the existing Codex setting
  4. 4. Choose a method for your workspace
  5. 5. When WakeClip fits a Codex workflow
  6. 6. Check your setup with a small task
  7. Common questions
  8. Sources and editorial review

1. Where is your Codex task running?

The model you choose does not answer this by itself. Ask which computer is changing files, executing commands and running tests.

  • On this Mac: You work in a local project through the app, terminal or editor. Local work depends on this computer remaining available.
  • On another computer: Confirm that commands actually execute there and check how its session handles a disconnected client.
  • In Codex cloud: OpenAI provides separate execution environments. A task started there does not need your Mac to remain its execution host. Read about Codex cloud.

A cloud model that needs to trigger its next command on your Mac is not a completely remote workflow. Equally, you do not need a lid spacer to keep an independently running cloud task alive.

2. Is the display off, the screen locked or the Mac asleep?

These states can look similar from the outside. A dark screen alone does not prove that the whole system is asleep. Screen locking concerns access to the session. Apple explicitly lists closing a MacBook display as a way to put the Mac to sleep. Apple’s sleep guidance.

Record when progress stops: immediately after closing the lid, some time later, or while the lid is still open. After reopening it, does Codex show a connection error or a question awaiting your reply? Those observations lead to different next steps.

3. Check the existing Codex setting

Open the app’s settings with + ,. Under General, OpenAI documents “Prevent sleep while running” for local work. Check this option in your installed version. Official app settings.

That description does not establish that every MacBook configuration will keep working with a fully closed lid. Test the state you intend to use. Do not assume an app preference also applies to a separate CLI session without checking.

4. Choose a method for your workspace

Start with the lid open and the appropriate keep-awake setting enabled. If that works, choose how you want the workspace to operate:

  • With an external monitor: check the documented closed-display setup for your MacBook.
  • Without a monitor: consider suitable software or a compatible physical lid spacer.
  • Without a running MacBook: check whether the task can move to an independent cloud or remote environment.

The MacBook methods comparison explains their requirements and differences.

5. When WakeClip fits a Codex workflow

WakeClip can fit a task that needs this Mac while you want to lower the lid at a fixed, clear workspace. It leaves a visible gap. Choose the version for your exact MacBook model and follow the fitting instructions in How WakeClip works.

The clip does not restore internet access, answer permission prompts or change Codex settings. Follow the fitting and safety information, and remove it before fully closing or transporting the MacBook. Do not put a running MacBook in a closed bag.

6. Check your setup with a small task

Before relying on the setup for important work, try a short task that cannot affect a live project:

  1. Record your MacBook model, macOS and Codex versions, execution location, power source and network.
  2. Use a project copy for a manageable task. First check that it progresses with the lid open.
  3. Repeat with your chosen method. Change one condition at a time and observe an actual intermediate result or completed action.
  4. Then check whether the task kept progressing, paused or waited for input. Finding the conversation still open is not enough to establish continued execution.

A successful short check does not establish overnight operation or results on another model. Find model information and the scope of available evidence on Compatibility and tests.

Common questions

Why does Codex stop with the lid open?

Check the displayed task state, unanswered questions, errors and connectivity first. A lid issue cannot explain a pause that starts before the lid moves. Our keep-awake troubleshooting guide covers general causes.

Can I leave Codex working overnight?

Choose an execution host that can remain available for the task. Check power, connectivity and expected requests for input. A clip alone cannot guarantee unattended operation.

Is the MacBook completely closed with WakeClip?

No. The small lid gap is how the product works. If a completely closed lid is a requirement, compare the other methods.

Choose your WakeClip model

Sources and editorial review

WakeClip editorial team · Sources checked on 14 September 2026. This guide explains documented features and a suggested check for your own setup; it does not report a WakeClip Codex endurance test.

Keep exploring

Back to all guides →