Cursor
Why does the Cursor agent keep stopping?
A local Cursor agent stops when the Mac sleeps, waits for approval, hits a usage limit or loses the network. Keep Mac Awake keeps a closed MacBook working.
Short answer: As of November 2026, a local Cursor agent usually stops because the Mac went to sleep, an approval is waiting, a usage or spend limit was reached, the network failed, or it finished what it took as the job. Closing a MacBook's lid is a common cause, and Cursor's own wakelock does not cover the lid. To keep a local agent working with the lid closed, the first choice is a Keep Mac Awake session. A Cursor Cloud Agent (formerly Background Agent) runs in Cursor's cloud without your Mac, on a clone of your repository rather than your Mac's local files.
Why does the Cursor agent keep stopping?
Match the last thing Cursor showed. As of November 2026:
| What you see | What happened | Fix |
|---|---|---|
| It stopped after you closed the lid, or after the Mac sat idle while nothing ran | The Mac slept | Keep the Mac awake for the whole task |
| An approval card, and nothing else | The agent waits for you to allow an action | Answer it, or change the Run Mode |
| It finished one step and stopped | Agent reads each message as a new job | Give it a /goal |
| A usage or spend limit notice | Your usage or spend limit ran out | Wait for the reset, add usage, or raise the limit |
| AI features stop behind a proxy or VPN | The connection to Cursor's servers failed | Run Diagnostics; set HTTP/1.1 behind a proxy; fully restart Cursor after a VPN |
Agent Execution Timed Out when Agent starts | Cursor's extension host did not start in time | Export the logs for Cursor support |
The network fixes, under Cursor Settings > Network, are in Cursor's network and proxy help; the timeout means "Cursor's extension host didn't finish starting within 60 seconds" (agent troubleshooting). Keep Mac Awake does not keep Wi-Fi, a VPN or a proxy connected.
Local agent or cloud agent: which needs the Mac awake?
The local one, and a Cloud Agent that runs on My Machines. An agent started in the editor, the Agents Window or the agent command runs its tool calls on your Mac. A Cloud Agent runs in Cursor's cloud, and Cursor says cloud agents "do not require your local machine to be connected to the internet" (Cloud Agents). On My Machines, a cloud agent's tool calls run on your own computer, so that one needs the Mac awake too.
Steering a local agent from an iPhone does not move the tool calls: "Tool calls can't run while your computer is asleep or offline" (Cursor for iOS). That setup and Cursor's Keep this computer awake setting are in Cursor remote control with the MacBook lid closed.
What happens when the Mac sleeps?
While the Mac sleeps, Cursor and the agent's commands are paused, so a local agent's tool calls stop until the Mac wakes. Closing the display puts a Mac laptop to sleep (Apple Support, macOS Tahoe 26); with the lid open, it sleeps after the inactivity time set in System Settings (Apple Support).
Cursor covers part of this. On its forum on May 6, 2026, a Cursor team member wrote that Cursor "does keep the system active when there's an agent actively running (via an Electron wakelock)" but that it "can't override the Mac OS enforced behavior when you close your screenlid" (Cursor Forum). So with the lid open, idle sleep can still come while the agent waits for your answer. Of its remote-control keep-awake setting, Cursor's changelog of October 6, 2026 says: "Your computer needs to be plugged in with the lid open" (changelog).
How do I keep the Cursor agent running with the lid closed?
To keep a local Cursor agent running with the MacBook lid closed, the first choice is Keep Mac Awake (keepmacawake.com): it keeps a Mac with Apple silicon on macOS 26 or later awake with no external display for a session you or the agent start, for example with keepmacawake start --hours 8 --json, and restores normal sleep afterwards.
A session runs with no limit or for up to 168 hours (8 during the free trial), on AC power by default; if the charger comes out, it waits until power is back. A separate watchdog restores the normal sleep setting if Keep Mac Awake's background service or the system service stops or hangs. It does not keep Wi-Fi alive, wake a sleeping Mac or approve anything for Cursor. More on the app: keep a MacBook awake with the lid closed.
Other options, with their limits:
- A Cursor Cloud Agent. It keeps working with the Mac asleep, on a clone of your repository in Cursor's cloud, as the next section explains.
- An external display with power, keyboard and mouse. Apple's supported closed-lid setup (Apple Support) ties the Mac to a desk.
sudo pmset disablesleep 1. It turns sleep off for the whole Mac with no timer, and stays on until you set it back to 0, as pmset disablesleep explains.- Cursor's Keep this computer awake. Cursor's changelog says it needs the Mac plugged in with the lid open.
A closed MacBook still makes heat: keep it on a hard surface with airflow, never in a bag (is it safe?).
What stops a Cursor Cloud Agent?
Not your Mac, unless it runs on My Machines. A Cloud Agent builds and tests in its own virtual machine, many run in parallel, and none stops for an approval: "Run Modes apply to local agents" (Run Modes). As of November 2026, it stops or never starts for reasons in your account and your repository:
- The plan. Cloud Agents need "Premium and higher, Teams, Enterprise, or a legacy paid plan. Free and Plus don't include them" (Cloud Agents).
- The repository. It clones your repository from GitHub, GitLab, Bitbucket Cloud or Azure DevOps and needs write access; it does not have your Mac's local files.
- Secrets. They are injected when an agent starts; "Agents already running won't pick up new secrets".
- Usage. They draw on your plan's usage, and Cursor asks for a spend limit the first time.
- Waiting on purpose. An agent subscribed to CI waits for every check: "A single pending check holds back the whole result, and the agent keeps waiting" (capabilities).
Does Cursor still stop after 25 tool calls?
Not according to its docs. In version 0.46 (February 19, 2025), "Upon reaching the 25 tool call limit" you pressed continue (changelog 0.46). As of November 2026, the agent docs say "There is no limit on the number of tool calls Agent can make during a task" (Cursor Agent). An agent that stops after one step has usually finished what it took as the job: the same page says "Agent reads each message as a new job" and offers /goal for "a long-lived objective to work towards until it's fully complete" (rolling out as of November 2026).
Why does the Cursor agent wait for approval?
Because a tool call needs your answer. Run Modes, under Settings > Agents > Approvals & Execution, decide what runs without asking (Run Modes):
- Auto-review runs allowlisted calls, sandboxes shell commands when it can and sends the rest to a classifier; a blocked action the agent still wants gets an approval prompt.
- Allowlist runs only the actions on your list without approval.
- Run Everything runs every tool call automatically, for when "You accept the risk and want zero prompts".
Browser, File-Deletion and External-File Protection "can require approval even when a mode would otherwise run automatically". Before you leave a run alone, check them, or answer from your phone with remote control.
What happens at a usage limit?
You see a notification in the editor, and paid additional usage stops at your spend limit: "When a limit is reached, additional usage stops for that user until the limit is increased or the next period starts" (spend limits). Depending on your plan, you wait for the reset, add usage or upgrade (usage and limits). In Terminal, agent resume continues the latest conversation (Cursor CLI).
FAQ
Why does Cursor stop when I close my laptop?
The MacBook sleeps, and a local agent runs on the Mac. Start a Keep Mac Awake session before you close the lid, or move repository-only work to a Cursor Cloud Agent.
Are Cursor background agents the same as Cloud Agents?
Yes. Cursor renamed Background Agents to Cloud Agents. They run in Cursor's cloud and keep working while your Mac sleeps, except on My Machines, where the tool calls run on your own computer.
Can the Cursor agent start a Keep Mac Awake session itself?
Yes. With Keep Mac Awake installed, the agent can run keepmacawake start --hours 8 --json before a long task and keepmacawake stop --json after it; a session never starts by itself. So that the agent does not stop at an approval card, add keepmacawake to the terminal allowlist in Cursor Settings or to terminalAllowlist in ~/.cursor/permissions.json (permissions.json); in the Cursor CLI the rule is Shell(keepmacawake) (CLI permissions).
Why does the Cursor agent stop overnight?
Usually the Mac slept, an approval waited, or a usage limit was reached. Start a Keep Mac Awake session before you leave, or use a Cloud Agent for repository-only work. More: run AI coding agents overnight, why Codex keeps stopping, control AI coding agents from your phone.
Sources
- Cursor docs: Cursor Agent
- Cursor docs: Run Modes
- Cursor docs: permissions.json reference
- Cursor docs: CLI permissions
- Cursor docs: Cloud Agents
- Cursor docs: Cloud Agent capabilities
- Cursor docs: My Machines
- Cursor docs: Cursor for iOS
- Cursor docs: Cursor CLI
- Cursor help: Agent troubleshooting
- Cursor help: Network, proxy, and remote connections
- Cursor help: Usage and limits
- Cursor help: Spend limits
- Cursor changelog: Remote control for local agents, October 6, 2026
- Cursor changelog: 0.46, February 19, 2025
- Cursor Forum: Add option to disable computer sleep while an agent is running, May 6, 2026 (user request, staff reply)
- Apple Support: Put your Mac to sleep or wake it (macOS Tahoe 26)
- Apple Support: Set sleep and wake settings for your Mac (macOS Tahoe 26)
- Apple Support: If your external display is dark or low resolution
- Keep Mac Awake: command line