No, Codex Locked use does not keep a closed MacBook running. Locked use lets Computer Use operate desktop apps after your Mac's screen locks while the Mac stays awake, not after closing the lid puts the Mac to sleep. When you need a closed Apple Silicon MacBook to stay awake without an external monitor or sudo, Clamshell for Mac keeps the Mac running while armed and includes an optional Agent Screen module for screen-using agents, free to test on your own setup for 7 days (no card required) and $9.99 once after.
Written by Matyas Rathonyi, the maker of Clamshell for Mac.
Locking and closing get mixed up because they happen back to back: you step away, the screen locks, and then you shut the lid. Locked use solves only the first event. Below: what OpenAI documents (checked October 11, 2026), how to enable Locked use, why closing the lid stops it, how to test a closed-lid setup without a monitor, and what is known about the "Unable to update Locked use" error.
What Locked use is
OpenAI's Computer Use documentation explains the feature plainly: "Locked use lets ChatGPT use Computer Use after your Mac locks, but only after you enable it. Use it when a ChatGPT task needs to use desktop apps from a connected device after the Mac locks." OpenAI now refers to the app as the ChatGPT desktop app; it is the same desktop app many developers call the Codex app, and the toggle lives inside Computer Use settings.
Computer Use is the part of Codex that clicks through graphical apps such as a browser, a Mac app, or the iOS Simulator instead of running shell commands. Normally, macOS blocks GUI automation the moment the screen locks.
Enabling Locked use changes the macOS unlock path. Per OpenAI, it "installs an Apple authorization plug-in that participates in the macOS unlock flow." OpenAI describes the scope as narrow: "Locked use is intentionally narrow. It's not a general-purpose remote-unlock path for your Mac, and it doesn't let other apps or local processes unlock the computer."
How to turn on Locked use
OpenAI documents three steps, with the first two done once:
- Open Settings > Computer Use in the app. Set up Computer Use first by installing the Computer Use plugin and granting macOS Screen Recording and Accessibility permissions.
- Enable locked use. Turning the switch on installs the Apple authorization plug-in.
- Start a Computer Use task from a connected device after your Mac's screen locks. Typically that means sending a task from the ChatGPT app on your phone over OpenAI's remote connections.
Four requirements follow from OpenAI's documentation:
- A Mac. "Locked use is for macOS. On Windows, Computer Use works in the foreground."
- A supported region. OpenAI's docs preface the feature with "In supported regions" without listing them on that page.
- A host that stays awake, online, and signed in. This is the remote connections requirement that closing a MacBook lid breaks.
- Approved apps only. Computer Use acts only inside apps you have allowed, and Locked use does not broaden that permission.
What happens when a task arrives at a locked Mac
When a remote task needs a desktop app on a locked Mac, OpenAI states that the app "temporarily unlocks the Mac while blocking local use and preserving the locked screen protections." Before unlocking, it "checks whether the unlock attempt is for an active, trusted Computer Use turn. Outside that short-lived window, ChatGPT denies the unlock and asks you to unlock manually if needed."
OpenAI lists four built-in safeguards:
- The authorization window is short-lived and scoped to the current unlock attempt.
- Automatic unlock is restricted to the app during active Computer Use turns.
- The app covers every display while the Mac is temporarily unlocked.
- Any local keyboard or pointer input relocks the Mac and pauses automatic unlock until you unlock it manually.
Computer Use keeps all of its normal restrictions while locked. OpenAI states it cannot automate terminal apps or the ChatGPT app itself, cannot authenticate as an administrator, and cannot approve macOS Privacy & Security prompts. If a task hits any of those, Locked use will not bypass them.
Why a closed lid is a different problem
Four Mac states look similar from across a room, yet behave very differently when a task arrives from your phone:
| State of the Mac | Mac running | Computer Use from phone | What decides it |
|---|---|---|---|
| Lid open, unlocked | Yes | Works | Idle sleep held off |
| Lid open, screen locked | Yes | Needs Locked use on | Locked use setting |
| Lid closed, nothing attached | No, asleep | Stops completely | Lid-close sleep |
| Lid closed, monitor + power | Yes | OpenAI's documented setup | Apple closed-display mode |
Verdict: Locked use solves a locked screen on an awake Mac; closing the lid without an external monitor triggers lid-close sleep, which stops Codex before Locked use can ever run.
OpenAI's Locked use section never mentions the laptop lid. The rule sits on OpenAI's remote connections page, which governs every task sent from a phone: "On a Mac laptop, remote access can stay available with the lid open and power connected. With the lid closed, connect an external display as well. Choosing Sleep still stops remote access." If the Mac sleeps, "remote access stops until it's available again."
Macworld confirmed that gap when the feature shipped (May 22, 2026): "It also won't work when you shut your MacBook's display, which triggers a different sleep mode." Because a sleeping Mac is not executing the app, it never reaches the unlock check. Staying awake is controlled separately under Settings > Connections, which also stops at a closed lid without a monitor (see Codex Keep this Mac awake not working).
What to do if the lid has to close
First, check whether one of OpenAI's free setups fits your situation, and see exactly where each stops:
Leave the lid open, on power
Free and directly supported by OpenAI. Enable the keep-awake option under Settings > Connections, turn on Locked use, lock your screen, and dim the brightness. Where it falls short: your laptop has to stay physically open on a desk and plugged into power.
Lid closed with an external display
OpenAI's documented closed-lid setup. Apple Support 102501 says a closed Mac laptop driving an external display must also be connected to power and using an external keyboard and mouse. Where it falls short: it requires a monitor, power, keyboard, and mouse at a desk, and still has an open bug report (#49808) after display dimming.
The task does not need a screen
If your Codex task edits code, runs tests, or calls APIs without clicking GUI apps, you do not need Computer Use or Locked use at all. Lid-close sleep is the only barrier, and Clamshell for Mac solves it directly with no monitor and no sudo (see keep Codex running with the lid closed).
Lid closed, no display, screen needed
This is the case OpenAI's free options leave uncovered: something has to keep the closed MacBook awake without an external monitor and still leave a screen available for desktop automation.
Where Clamshell fits, and where it is unproven
Most Codex work needs no screen at all: code edits, tests, builds and API calls. Clamshell for Mac covers that fully. Armed, it keeps an Apple Silicon MacBook (macOS 14+) awake with the lid closed and no external display, on power or battery, with no sudo, no admin password, no kernel extension, and no privileged helper. For screen-driving agents, Clamshell's optional Agent Screen module (off by default) lets agents use the screen during an armed closed-lid session while the built-in display stays black, so computer use and the iOS Simulator keep working.
What you get with Clamshell armed:
- No external monitor and no admin rights. Keeps your closed MacBook awake on power or battery with no
sudo, no dummy plug, and nothing to undo. Normal lid sleep returns when you disarm, quit, or restart. - Built-in Agent Screen module. Lets screen-using agents and the iOS Simulator keep working while the built-in display stays dark.
- Always-on heat protection and 20% battery floor. Serious or critical thermal pressure disarms toward normal lid sleep; low-battery disarm at 20% is on by default.
- Optional Codex v2 modules. Includes Agent Status, Agent Notifications, and Finish Work, Then Sleep alongside Shortcuts and URL automation (
open "clamshell://arm").
Try it on your own Codex runs first: Download free trial (free for 7 days, no card required; $9.99 once for 1 Mac or $19.99 for up to 3 Macs, with a 14-day money-back guarantee).
One combination is yours to check during the trial: if your Mac locks while the lid is closed, Codex's Locked use unlock step has to succeed in that state, and neither OpenAI nor Clamshell documents it. This two-minute check answers it on your Mac:
- Confirm Locked use works with the lid open. Lock your Mac, send a short Computer Use task from your phone, and verify Codex completes it.
- Arm Clamshell and enable Agent Screen. Confirm the menu bar icon shows Armed.
- Close the lid for two minutes and resend the same task. If Codex operates the app and replies with the result, it works on your Mac. If Codex asks you to unlock manually, the unlock step did not fire with the lid shut and an external display remains OpenAI's documented setup.
On some Macs an armed closed-lid session can end with macOS logging the user out; if that happens, Clamshell turns the display off with the lid closed from then on and notifies you, which removes the screen for GUI agents.
For a breakdown of HDMI dummy plugs and virtual displays for screen-using agents, see can AI agents use the screen with the lid closed.
"Unable to update Locked use": what is known
OpenAI's docs do not explain the "Unable to update Locked use" error. Three open reports on openai/codex (checked October 11, 2026, all with no OpenAI reply) document where it shows up:
- After an app update on Apple Silicon (#28604, filed June 16, 2026): an update switched Locked use off, and re-enabling it fails with "Unable to update Locked use".
- Paired with "Plugin update failed" (#29216, filed June 20, 2026 on an M1 Max): both messages persisted even after reinstalling the app, resetting Screen Recording and Accessibility permissions, and restarting macOS.
- On an Intel Mac (#39648, filed August 20, 2026): the toggle switches itself back off while the log shows the managed Computer Use service failing to start; several open issues report missing Computer Use components on Intel builds.
Without an official fix, check the documented prerequisites first:
- Confirm Computer Use works while the Mac is unlocked (Locked use depends on it).
- Verify Screen Recording and Accessibility under System Settings > Privacy & Security.
- Update the app, quit and relaunch it, and try toggling Locked use again.
- If it still fails, add your app version, macOS version, and Mac model to the matching GitHub issue.
Note before enabling Locked use on a primary Mac: because Locked use installs an authorization plug-in into the macOS unlock flow, users have filed unconfirmed reports of failed automatic unlocks and login keychain issues (such as #35553). On the closed-lid side specifically, issue #49808 (filed October 1, 2026) reports a Mac on power with the lid closed and two external monitors unlocking twice in an hour before failing once the display dimmed and locked. Test any unattended setup before relying on it.
When a free setup is the better pick:
- You can leave the lid open on power or stay connected to a desk monitor. OpenAI's documented open-lid and external-display setups cost nothing.
- You run an Intel Mac or macOS 13 or earlier. Clamshell requires Apple Silicon and macOS 14 or later.
Frequently asked questions
What is Locked use in Codex?
Locked use is a macOS setting for Computer Use in OpenAI's desktop app that lets Computer Use keep driving approved desktop apps after your Mac locks. When a remote task arrives, it temporarily unlocks the Mac while blocking local input and covering every display.
How do I turn on Locked use in Codex?
Open Settings > Computer Use in the app (with Computer Use, Screen Recording, and Accessibility already set up), enable Locked use to install the Apple authorization plug-in, and start a Computer Use task from a paired device after your Mac locks.
Does Codex Locked use work with the MacBook lid closed?
Not on its own. Locked use only handles a locked screen on an awake Mac; closing the lid puts the Mac to sleep and stops Codex completely. OpenAI documents an external display for closed-lid use, or you can test Clamshell's 7-day free trial (with Agent Screen) on your own Mac in two minutes.
Why does Codex say Unable to update Locked use?
OpenAI has not documented a cause. Open openai/codex GitHub issues (#28604, #29216, #39648 as of October 11, 2026) report the error after app updates on Apple Silicon and on Intel Macs where the Computer Use service fails to start, with no official reply in those threads.
Is Locked use the same as keeping the Mac awake?
No. Locked use handles the lock screen; keeping the Mac awake is separate. With the lid open on power, OpenAI's keep-awake setting handles idle sleep; with the lid closed and no external monitor, you need a lid-closed app such as Clamshell for Mac.
Does Clamshell make Locked use work with the lid closed?
Clamshell solves the sleep half: it keeps your closed Apple Silicon MacBook awake with no monitor and no sudo, and its optional Agent Screen module lets agents use the screen while the built-in display stays dark. Locked use's own unlock step with the lid shut is undocumented by OpenAI, so run the two-minute check during Clamshell's free 7-day trial (no card required).
Why pay $9.99 for Clamshell when leaving the lid open or using an external monitor is free?
Leaving the lid open exposes your screen and takes desk space, and Apple's closed-display mode ties you to a monitor, power, keyboard, and mouse. Clamshell costs $9.99 once (no subscription) so your Apple Silicon MacBook keeps running Codex with the lid closed and no monitor, no sudo, an always-on heat cut-off, and a 20% battery floor. Test the 7-day free trial (no card required) first.
Try Clamshell free for 7 days
Keep your closed Apple Silicon MacBook awake for Codex with no external monitor, no sudo, an optional Agent Screen module, an always-on heat cut-off, and a 20% battery floor. Normal lid sleep returns when you disarm or quit.
$9.99 for 1 Mac, $19.99 for up to 3 Macs. 7-day free trial with no card required and a 14-day money-back guarantee. Apple Silicon, macOS 14 or later, notarized by Apple. Also available via Homebrew (brew install --cask clamshell) or Setapp.
Related guides
- Keep Codex running when you close your MacBook lid
- Codex Keep this Mac awake not working with the lid closed
- Can AI agents use the screen with the MacBook lid closed?
- Use Codex from your phone with the MacBook lid closed
- Dummy display plug vs an app
- Does Claude keep running if you lock your laptop?
- How to keep a MacBook awake with the lid closed
- Clamshell mode without an external display
Sources checked October 11, 2026: OpenAI's Computer Use and Remote connections docs, Macworld (May 22, 2026), openai/codex issues #28604, #29216, #39648, #49808, and #35553, and Apple Support 102501. Clamshell details from version 2.0.5 and published documentation. Product names belong to their respective owners.