Cursor agent shell loses output when window loses focus (macOS)

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

The agent’s shell tool stops displaying output whenever the Cursor window loses focus (e.g., switching desktops or locking the screen). Output resumes once the window is refocused.

The agent itself continues running and can still execute commands, but it becomes effectively useless because it focuses on diagnosing why its shell tool is not producing output.

This makes it difficult to run multiple agents concurrently across different desktops, since any agent that remains out of focus for too long becomes useless.

Steps to Reproduce

  1. Open multiple Cursor windows on different desktops
  2. Start agent tasks in each that require using the shell tool (typical dev tasks work for this).
  3. Switch away from a window (e.g., change desktop or lock screen)
  4. After a few minutes, shell output stops in unfocused windows

Expected Behavior

Cursor agent should operate effectively regardless if the IDE window is in focus or not.

Screenshots / Screen Recordings

The activity below happened over the course of 45 minutes while my laptop was locked – prior to locking the agent was working effectively:

Operating System

MacOS

Version Information

Version: 2.6.19
VSCode Version: 1.105.1
Commit: 224838f96445be37e3db643a163a817c15b36060
Date: 2026-03-12T04:07:27.435Z
Build Type: Stable
Release Track: Default
Electron: 39.4.0
Chromium: 142.0.7444.265
Node.js: 22.22.0
V8: 14.2.231.22-electron.0
OS: Darwin arm64 25.2.0

Does this stop you from using Cursor

Yes - Cursor is unusable

Hey, thanks for the detailed report. I can see the screenshot, it’s clear what’s happening: the agent runs commands, but the shell returns empty output, and then the agent gets stuck in an endless diagnostic loop.

This is a bug on our side. When the Cursor window loses focus on macOS, the system throttles background processes (Chromium background throttling and macOS App Nap), and terminal output polling stops working in time. We’ve fixed similar issues before in other parts of the UI.

I’ve shared this with the team, but I can’t promise a specific timeline yet.

As a temporary workaround, the main option right now is to keep the window focused and avoid switching desktops. If you’re using multiple agents, you can try putting the windows side by side on the same desktop so none of them goes fully into the background.

Let me know if you find anything else.