Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Environment
- Cursor Version: 3.32.10
- OS: macOS (Apple Silicon / arm64)
- Network setup: Local HTTP proxy (
http.proxy), HTTP/2 enabled (default)
Summary
After a brief network/DNS blip (e.g. router/proxy restart), all local agent tools (Shell, Grep, Glob, Read) permanently hang in the affected window — even after network connectivity recovers, and even in newly created chats in the same window. Only Reload Window or restarting Cursor resolves it.
Meanwhile, LLM streaming (RunInference) and preToolUse hooks continue working normally.
Root Cause
- Before executing local tools,
cursor-agent-exec/cursor-agent-hostawaitsteamSettingsService:Shell:LocalShellStreamExecutor.run→permissionsService.shouldEnforceShellInvariantBlocks→teamSettingsService.getAdminCommandDenylist()&ignoreService.isRepoBlocked()(beforeShell stream: approval gate reachedand before spawning).Read/Grep/Glob:permissionsService.shouldBlockFileRead/ignoreService.isRepoBlocked/getRepoBlockExcludeGlobs→teamSettingsService.getTeamRepos()&getTeamAdminSettings().
- Both methods use a 10-minute single-flight TTL cache (
this.inFlight) that does not accept the tool call’sAbortSignal. Once the cache expires (> 600,000 ms), every tool call awaitsthis.inFlight. - In
workbench.desktop.main.js,MainThreadCursor.$getTeamAdminSettings()andMainThreadCursor.$getTeamRepos()invokedashboardClient().getTeamAdminSettingsOrEmptyIfNotInTeam(...)andgetTeamReposOrEmptyIfNotInTeam(...)without passing anAbortSignalor timeout (unlikeAdminSettingsService, which does pass{ signal }). - If the underlying HTTP/2 unary RPC wedges during a transient network/proxy disruption,
this.inFlightnever resolves or rejects, permanently wedging all local tools across every conversation in that Extension Host until reload/restart.
Evidence from Logs
- Right after a brief DNS / HTTP/2 disruption (
HTTP/2 session abandoned after a request waited 20s for it to connect to api2.cursor.sh):Readlogs the watchdog warning:
[warning] [watchdog, LocalReadExecutor] permissionsService.shouldBlockFileRead still not completed after 3000msShelllogsSmart Mode shell foreground handoff, completespreToolUsehooks in ~12ms, and then never reachesShell stream: approval gate reached. Stopping generation producesError: Command failed to spawn: Aborted.GlobandGrepsimilarly hang indefinitely until aborted.- Observed identically across two different workspace windows on the same day.
Suggested Fix
- Add a bounded timeout (e.g.
AbortSignal.timeout(...)) toMainThreadCursor.$getTeamAdminSettings()andMainThreadCursor.$getTeamRepos()(and/or inside theTeamSettingsServicesingle-flightrefresh()wrapper) sothis.inFlightis always cleared infinallyon hang/timeout. - On timeout/failure, fall back cleanly to the last known cached settings (or fail-open for personal accounts not in a team) rather than blocking all local tools indefinitely.
Steps to Reproduce
Real-world scenario (observed twice on the same day across two windows)
- Open a workspace in Cursor with HTTP/2 enabled (default) behind a local HTTP proxy (
http.proxy). - Use Agent normally (Shell / Read / Grep work fine) for more than 10 minutes so the
TeamSettingsServicecache (600000 msTTL) expires. - Cause a brief network / DNS / proxy disruption (e.g., restart router proxy or drop upstream packets so the existing HTTP/2 connection stalls).
- Once network connectivity recovers, ask the Agent to run any local tool (
Shell,Grep,Glob, orRead) — or even open a brand-new chat in the same window and ask it to runecho ok. - Result: LLM streaming (
RunInference) andpreToolUsehooks still work, but every local tool hangs indefinitely until manually stopped (Error: Command failed to spawn: Aborted/[watchdog, LocalReadExecutor] permissionsService.shouldBlockFileRead still not completed after 3000ms). The window stays permanently wedged untilReload Windowor full restart.
Deterministic repro (for engineering)
- Configure Cursor with a local proxy (or traffic shaper) that accepts TCP/TLS connections to
api2.cursor.shand silently blackholes responses (half-open / stalled HTTP/2 stream) forGetTeamAdminSettingsOrEmptyIfNotInTeamorGetTeamReposOrEmptyIfNotInTeam(or drop packets right as the 10-minute cache expires / on fresh window startup). - Trigger any
Shell,Read,Grep, orGlobtool call from Agent. - Restore normal network connectivity and cancel the stalled turn.
- Start a new chat in the same window and run
echo okor read any file — all local tools remain permanently blocked awaiting the wedgedthis.inFlightpromise.
Operating System
MacOS
Version Information
Version 3.32.10 (Universal)
For AI issues: add Request ID with privacy disabled
c98eff24-ca95-40bb-a759-80fba7106789
Does this stop you from using Cursor
Sometimes - I can sometimes use Cursor