AI development is new and exciting, but while AI agents are doing their thing, you can end up waiting for a good amount of time. It’s a nice opportunity to get up and go do something, but if your Mac goes to sleep, AI agents stop working.
Some developers turn to invoking a caffeinate session or using utilities to bypass the Lock Screen settings. Others use dummy display dongles to trick the Mac into thinking a display is attached, thus preventing sleep mode. But OpenAI announced a new capability in its Codex AI assistant that makes it even easier: Codex now has the ability to keep running after your Mac is locked.
In Codex’s settings, there is an option for Locked use, which does exactly what it says when you turn it on. An Apple authorization plug-in installs, and then Codex will keep running. According to OpenAI’s Codex documentation, “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.”
Foundry
OpenAI notes that this feature has some safeguards, including a short-lived authorization window, availability only to Codex, and coverage for every connected display. It also won’t work when you shut your MacBook’s display, which triggers a different sleep mode. But if you don’t want a dongle or an app, this is a handy feature for OpenAI developers.


