All local agent tools (Shell/Grep/Glob/Read) permanently hang after transient network/HTTP2 drop due to un-timed-out $getTeamAdminSettings / $getTeamRepos single-flight cache

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

  1. Before executing local tools, cursor-agent-exec / cursor-agent-host awaits teamSettingsService:
    • Shell: LocalShellStreamExecutor.run → permissionsService.shouldEnforceShellInvariantBlocks → teamSettingsService.getAdminCommandDenylist() & ignoreService.isRepoBlocked() (before Shell stream: approval gate reached and before spawning).
    • Read / Grep / Glob: permissionsService.shouldBlockFileRead / ignoreService.isRepoBlocked / getRepoBlockExcludeGlobs → teamSettingsService.getTeamRepos() & getTeamAdminSettings().
  2. Both methods use a 10-minute single-flight TTL cache (this.inFlight) that does not accept the tool call’s AbortSignal. Once the cache expires (> 600,000 ms), every tool call awaits this.inFlight.
  3. In workbench.desktop.main.js, MainThreadCursor.$getTeamAdminSettings() and MainThreadCursor.$getTeamRepos() invoke dashboardClient().getTeamAdminSettingsOrEmptyIfNotInTeam(...) and getTeamReposOrEmptyIfNotInTeam(...) without passing an AbortSignal or timeout (unlike AdminSettingsService, which does pass { signal }).
  4. If the underlying HTTP/2 unary RPC wedges during a transient network/proxy disruption, this.inFlight never 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):
    • Read logs the watchdog warning:
      [warning] [watchdog, LocalReadExecutor] permissionsService.shouldBlockFileRead still not completed after 3000ms
    • Shell logs Smart Mode shell foreground handoff, completes preToolUse hooks in ~12ms, and then never reaches Shell stream: approval gate reached. Stopping generation produces Error: Command failed to spawn: Aborted.
    • Glob and Grep similarly hang indefinitely until aborted.
    • Observed identically across two different workspace windows on the same day.

Suggested Fix

  1. Add a bounded timeout (e.g. AbortSignal.timeout(...)) to MainThreadCursor.$getTeamAdminSettings() and MainThreadCursor.$getTeamRepos() (and/or inside the TeamSettingsService single-flight refresh() wrapper) so this.inFlight is always cleared in finally on hang/timeout.
  2. 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)

  1. Open a workspace in Cursor with HTTP/2 enabled (default) behind a local HTTP proxy (http.proxy).
  2. Use Agent normally (Shell / Read / Grep work fine) for more than 10 minutes so the TeamSettingsService cache (600000 ms TTL) expires.
  3. Cause a brief network / DNS / proxy disruption (e.g., restart router proxy or drop upstream packets so the existing HTTP/2 connection stalls).
  4. Once network connectivity recovers, ask the Agent to run any local tool (Shell, Grep, Glob, or Read) — or even open a brand-new chat in the same window and ask it to run echo ok.
  5. Result: LLM streaming (RunInference) and preToolUse hooks 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 until Reload Window or full restart.

Deterministic repro (for engineering)

  1. Configure Cursor with a local proxy (or traffic shaper) that accepts TCP/TLS connections to api2.cursor.sh and silently blackholes responses (half-open / stalled HTTP/2 stream) for GetTeamAdminSettingsOrEmptyIfNotInTeam or GetTeamReposOrEmptyIfNotInTeam (or drop packets right as the 10-minute cache expires / on fresh window startup).
  2. Trigger any Shell, Read, Grep, or Glob tool call from Agent.
  3. Restore normal network connectivity and cancel the stalled turn.
  4. Start a new chat in the same window and run echo ok or read any file — all local tools remain permanently blocked awaiting the wedged this.inFlight promise.

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

Hey @Yixian_Huang, that’s correct. Local tools wait on the team settings and repo checks before running, those calls don’t have a timeout on the window path, and if one request stalls in flight every later local tool call in that window waits on it - including on personal accounts with no team.

This is a known issue on our side and we’ve added your report and repro details to the tracked issue. For now, running Reload Window from the Command Palette on the affected window clears the stuck state without needing to restart Cursor or close your other windows.