> ## Content Index
> Fetch the complete content index at: https://www.narendravardi.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Codex released "Prevent sleep while running" under /experimental features
- URL: https://www.narendravardi.com/codex-released-prevent-sleep-while-running-under-experimental-features/
- Published: 2026-10-17T10:30:00.000Z
- Updated: 2026-10-17T10:29:59.000Z
- Description: I previously used `caffeinate` to keep my Mac awake during Codex sessions. Codex now has an experimental “Prevent sleep while running” toggle you can enable directly from the terminal.
- Author: Narendra Vardi
- Tags: 2026, ai, Tools

In my [earlier post](https://www.narendravardi.com/use-caffeinate-to-keep-claude-code-and-codex-running-on-mac/), I talked about how you can use mac laptop's in-built 'caffeinate' command to keep Claude Code and Codex sessions active.

You don't need this anymore in codex. This feature is introduced as part of experimental features. You can just toggle it.

**Enabling is quite simple, just follow the below steps:**

1. Launch **Codex in your terminal**.
2. Type **`/experimental`** and press **enter**. You see a screen like below.
3. Use **`Arrows to navigate`** and **`space bar to toggle`** the feature.

![](https://storage.ghost.io/c/d9/fa/d9faef57-e1a8-4faa-a907-40713e9d52a6/content/images/2026/10/Screenshot-2026-10-17-at-1.34.39---PM.png)

If you set it once, I think it should be good enough for the toggle to be active across all sessions (unless of-course they choose to neglect it during an update).