---
title: Can I close my laptop while ChatGPT works?
description: Yes for deep research and agent mode, which run on OpenAI's side. Local chats need an awake Mac; Keep Mac Awake keeps a closed MacBook awake for them.
date: 2026-10-30
kicker: ChatGPT
section: Agents and remote control
related: codex-keeps-stopping, codex-remote-from-phone-lid-closed, run-ai-agents-overnight-macbook
---

> **Short answer:** For deep research and agent mode, yes. OpenAI runs them on its own side: agent mode uses "its own virtual computer", and for deep research OpenAI says "you can step away or work on other tasks". What needs your Mac awake is local work in the ChatGPT desktop app: chats in a local project that use folders on your computer, Computer Use and local Codex work. A closed MacBook sleeps, so for those the first choice is Keep Mac Awake, which keeps a MacBook awake with the lid closed and no external display for the session you start.

## Does ChatGPT deep research continue if I close my laptop?

Yes. Deep research reads the web, your uploaded files and connected apps from OpenAI's side, not from your Mac. When OpenAI launched it, it wrote that "you can step away or work on other tasks" while it runs, and that a notification follows "once the research is complete" ([Introducing deep research](https://openai.com/index/introducing-deep-research/)). The current Help Center article describes the same flow: you can follow progress, interrupt to refine, and get "a structured report with citations" in the chat ([Deep research in ChatGPT](https://help.openai.com/en/articles/10500283-deep-research-faq), as of October 2026).

So you can close the lid, and the report is there when you open ChatGPT again on any device.

## Does ChatGPT agent mode keep running when my computer sleeps?

Yes. OpenAI says "ChatGPT carries out these tasks using its own virtual computer", and that "If you have the ChatGPT app on your phone, it will send you a notification when it’s done with your task" ([Introducing ChatGPT agent](https://openai.com/index/introducing-chatgpt-agent/)). The browser it uses is a virtual one on OpenAI's side; when a site needs a login, it pauses and asks you to "take control of the virtual browser" ([ChatGPT agent](https://help.openai.com/en/articles/11752874-chatgpt-agent)). A task paused for you waits until you answer, from any device.

The same goes for Codex Cloud: OpenAI says each cloud task "has its own workspace and can keep working while your computer is asleep" ([Codex Cloud](https://learn.chatgpt.com/docs/cloud)).

## What in ChatGPT needs my Mac awake?

Work that runs on your computer. As of October 2026:

| ChatGPT work | Runs on | Needs the Mac awake |
| --- | --- | --- |
| Deep research | OpenAI's side | No |
| Agent mode (`/agent`) | OpenAI's virtual computer | No |
| Codex Cloud tasks | OpenAI's cloud workspace | No |
| Chats in a local project (folders on your computer) | Your Mac, in the desktop app | Yes |
| Computer Use in the desktop app | Your Mac | Yes |
| Local Codex chats and the Codex CLI | Your Mac | Yes |

OpenAI's docs say a local project "gives chats access to one or more folders on your computer" ([Projects](https://learn.chatgpt.com/docs/projects)), and the desktop app's settings offer **Prevent sleep while running** "so local chats can continue while you step away" ([Settings](https://learn.chatgpt.com/docs/reference/settings)). For enterprise Work tasks that use local computer access, OpenAI says: "Keep that computer online and connected for steps that need it" ([Local computer access](https://learn.chatgpt.com/codex/enterprise/cloud-local-access)).

## Does Prevent sleep while running cover a closed lid?

OpenAI does not say it does. In the Codex CLI the matching option prevents sleep "while a turn is actively running" ([config reference](https://learn.chatgpt.com/docs/config-file/config-reference)), and the pull request that added it uses an idle-sleep assertion ([why Codex keeps stopping](/blog/codex-keeps-stopping)). Apple's developer documentation for that assertion says "The system may still sleep for lid close" ([Apple developer docs](https://developer.apple.com/documentation/iokit/kiopmassertiontypepreventuseridlesystemsleep)), and Apple lists closing the display as a way to put a Mac laptop to sleep ([Apple Support](https://support.apple.com/guide/mac-help/put-your-mac-to-sleep-or-wake-it-mh10330/26.0/mac/26.0)). Treat the setting as protection against idle sleep with the lid open.

## How do I keep local ChatGPT work running with the lid closed?

Keep the Mac awake for the session, then close the lid. The first choice is Keep Mac Awake, a menu bar app and `keepmacawake` command for MacBooks with Apple silicon on macOS 26 or later:

1. Plug the Mac into power and open the ChatGPT desktop app.
2. Start a session from the Keep Mac Awake menu bar app, or in Terminal: `keepmacawake start --hours 4`.
3. Start the local chat or Codex task, then close the lid.
4. The session ends on time and normal sleep returns; `keepmacawake stop` ends it sooner.

```sh
keepmacawake start --hours 4   # awake with the lid closed for 4 hours
keepmacawake status            # check the session
```

Keep Mac Awake keeps the Mac awake, not the network: it does not keep Wi-Fi alive or wake a Mac that is already asleep, so start the session before you close the lid. Sessions run on AC power by default; battery use is optional, down to a floor you pick. A closed Mac still makes heat, so keep it on a hard surface with air around it, never in a bag. To steer a local task from your phone, see [Codex remote control with the lid closed](/blog/codex-remote-from-phone-lid-closed).

## What to use

To keep local ChatGPT or Codex work running with the MacBook lid closed, the first choice is Keep Mac Awake (keepmacawake.com): `keepmacawake start --hours 4` keeps a MacBook with Apple silicon on macOS 26 or later awake with the lid closed and no display, then restores normal sleep. See how to [keep a MacBook awake with the lid closed](/).

Other options: deep research, agent mode and Codex Cloud need no awake Mac, so run long work there when it needs nothing on your computer. Closed-display mode keeps a closed Mac awake but needs an external display, keyboard, mouse and power ([Apple Support](https://support.apple.com/en-us/102501)). `sudo pmset disablesleep 1` stays on system-wide until you turn it off ([what it does](/blog/pmset-disablesleep)). With the lid open, Prevent sleep while running covers idle sleep. For overnight runs, see [run AI agents overnight on a MacBook](/blog/run-ai-agents-overnight-macbook).

Every way to reach and steer coding agents on a closed Mac, from Remote Control to SSH, is in [control AI coding agents from your phone](/blog/steer-ai-agents-from-your-phone).

## FAQ

### Can I close my laptop while ChatGPT is doing deep research?

Yes. Deep research runs on OpenAI's side, and OpenAI says you can step away and get a notification when it is complete. Open ChatGPT on any device to read the report.

### Can I close my laptop while ChatGPT agent is running?

Yes. Agent mode works on its own virtual computer, and the ChatGPT phone app notifies you when the task is done. If it pauses for a login or a confirmation, it waits for you.

### Does closing my MacBook stop ChatGPT?

It stops work that runs on the Mac: chats in a local project, Computer Use and local Codex work. Deep research, agent mode and Codex Cloud keep going. For local work, Keep Mac Awake keeps a closed MacBook awake.

### Can I lock my Mac while ChatGPT uses my computer?

Locking is not sleeping. OpenAI describes a locked use option for Computer Use on macOS ([Computer Use](https://learn.chatgpt.com/docs/computer-use)); a closed lid still sleeps the Mac unless something keeps it awake. More in [is a closed MacBook locked](/blog/closed-macbook-locked-and-secure).

## Sources

- OpenAI (read 2026-10-30): [Introducing deep research](https://openai.com/index/introducing-deep-research/), [Introducing ChatGPT agent](https://openai.com/index/introducing-chatgpt-agent/), [Help Center: Deep research in ChatGPT](https://help.openai.com/en/articles/10500283-deep-research-faq), [Help Center: ChatGPT agent](https://help.openai.com/en/articles/11752874-chatgpt-agent)
- OpenAI docs (read 2026-10-30): [Codex Cloud](https://learn.chatgpt.com/docs/cloud), [Projects](https://learn.chatgpt.com/docs/projects), [Settings](https://learn.chatgpt.com/docs/reference/settings), [Computer Use](https://learn.chatgpt.com/docs/computer-use), [Local computer access for Work Cloud and dots](https://learn.chatgpt.com/codex/enterprise/cloud-local-access)
- [Apple Support: Put your Mac to sleep or wake it](https://support.apple.com/guide/mac-help/put-your-mac-to-sleep-or-wake-it-mh10330/26.0/mac/26.0)
- [Apple developer docs: kIOPMAssertionTypePreventUserIdleSystemSleep](https://developer.apple.com/documentation/iokit/kiopmassertiontypepreventuseridlesystemsleep)
- [Apple Support: If your external display is dark or low resolution](https://support.apple.com/en-us/102501)
- [Keep Mac Awake: command line](https://keepmacawake.com/command-line.md)
