Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
On Windows, Cursor’s branch→PR resolver falls back to local GitHub CLI (gh pr list) through agent-exec. When the current feature branch has no pull request URL, a force-refresh path retries about every 1 second, spawning visible console windows (pwsh → conhost → gh). This causes constant popup flashes and wasted CPU.
This started after upgrading to Cursor 3.13.10 (installed on this machine 2026-07-23/24). It happens in the main IDE (file tree left, editor center, Agent chat on the right; CURSOR_LAYOUT=unifiedAgent). I do not use the separate Agents Window.
Process Explorer shows:
Cursor.exe
└─ pwsh.exe -ExecutionPolicy Bypass -NonInteractive -File %TEMP%\ps-script-<uuid>.ps1
└─ conhost.exe
└─ gh.exe pr list --repo <owner/repo> --head <feature-branch> --state all --json url
Environment on the flashing pwsh process includes:
CURSOR_AGENT=1CURSOR_EXTENSION_HOST_ROLE=agent-execCURSOR_LAYOUT=unifiedAgent
Temp script Cursor generates contains:
Set-Location '<workspace>'
# Execute user command
gh pr list --repo "<owner>/<repo>" --head "<branch>" --state all --json url
Local product path appears to be branchPullRequestGhCliFallback / branchMetadataService.resolveBranch(..., { forceRefresh: true }) with _scheduleForceRefreshRetry at 1000ms when no PR URL is latched.
Workaround that stops the loop for one branch: open a draft PR so Cursor can latch a URL. Closing that PR while staying on the branch can bring the loop back. This is a band-aid, not a fix.
Not caused by Task Scheduler, Claude Code extension, or user hooks (ruled out).
Steps to Reproduce
- Use Windows 11 with Cursor 3.13.10.
- Use the main IDE layout (Agent chat on the right). Do not open Agents Window.
- Open a GitHub-backed git repo.
- Check out a feature branch that has no open PR (local-only branch, or pushed branch with no PR).
- Keep Agent chat active and/or run a Compound Engineering plan / normal agent work in that repo.
- Watch for brief console window flashes on screen.
- In Process Explorer, observe repeating short-lived processes:
pwshrunning%TEMP%\ps-script-*.ps1, thengh pr list --repo … --head … --state all --json url. - Optional confirm: create a draft PR for that branch → flashes for that branch stop. Stay on a different feature branch with no PR → flashes return.
Expected Behavior
- If a branch has no PR, Cursor should resolve once to “no PR” and stop retrying every second.
- Background
pwsh/ghlookups on Windows should be spawned withCREATE_NO_WINDOW/ hidden console so they never flash. - Prefer API/SCM backend for PR metadata instead of shelling out to
gh, or provide a setting to disable the CLI fallback (especially on Windows).
Actual behavior: unbounded ~1s force-refresh retries via visible console subprocesses whenever the current feature branch has no PR URL.
Screenshots / Screen Recordings
Operating System
Windows 10/11
Version Information
Cursor version: 3.13.10
Commit: 4f02290ccd9304f0e6bf8ee85f6e9106f02ac1f0
Date: 2026-07-23
Layout tag observed on failing process: unifiedAgent
For AI issues: which model did you use?
Not model-specific. This reproduces from IDE/agent PR-metadata background activity, not from a particular chat completion model.
For AI issues: add Request ID with privacy disabled
N/A — this is not tied to one chat completion request.
If needed for correlation, the failing activity is continuous agent-exec shell spawns of:
gh pr list --repo <owner/repo> --head <branch> --state all --json url
while Agent chat is open on a feature branch with no PR.
Additional Information
- Shell used by Cursor for the spawn: PowerShell 7
C:\Program Files\PowerShell\7\pwsh.exe - GitHub CLI installed:
C:\Program Files\GitHub CLI\gh.exe - Reproduced across multiple repos/branches, e.g.:
bradleybenner/cursor/feat/cognee-unified-second-brainbradleybenner/para-areas/feat/warm-specialist-portfolio
- Creating a draft PR for the active branch stops the loop for that branch; measured spawn rate dropped from ~1/sec to 0.
- No user setting found in 3.13.10 to disable
branchPullRequestGhCliFallback/ branch metadata force-refresh. Cursor Settings “PR Attribution” only controls attribution labeling, not this lookup loop. - Separate/unrelated flashes can also come from Docker Desktop
docker statswhen the Docker dashboard is open; those stopped when Docker UI was closed. Thegh pr listloop is Cursor-specific. - Related Windows issue class: agent shell spawns missing
CREATE_NO_WINDOW. This report is specifically the PR-metadatagh pr listretry loop in the main IDE.
Does this stop you from using Cursor
No - Cursor works, but with this issue
