Why your Mac sleeps while ChatGPT is still working
The ChatGPT desktop app spends almost all of a long answer waiting on the network — the model does the heavy lifting on OpenAI's servers while your Mac sits near 0% CPU. macOS decides sleep from CPU and user input, so a Mac that's watching ChatGPT think looks idle to the OS. When your sleep timer runs out, macOS suspends everything: the app freezes mid-stream, and a Work with Apps session over Xcode, VS Code, or your terminal stalls right along with it.
Agent mode is a partial exception, and it's worth being straight about: agent-mode tasks run on OpenAI's computers, so the task itself doesn't die when your Mac sleeps. But agent runs are supervised — ChatGPT pauses and asks you before consequential steps, and a sleeping Mac can't answer. A task that usually takes 5–30 minutes becomes "however long until you wake the Mac and find the prompt waiting."
The fix is to stop macOS from sleeping while ChatGPT is actually doing something — then let it sleep normally again shortly after it goes quiet — within your grace window, 90 seconds by default. You can do that for free in two minutes, or with a tool that knows the difference between "answer in progress" and "idle chat window" so you don't have to babysit it.