Skip to content

Prevent background Cursor login browser launches#125

Merged
yaacovcorcos merged 2 commits into
mainfrom
agent/cursor-background-browser-guard
Jul 25, 2026
Merged

Prevent background Cursor login browser launches#125
yaacovcorcos merged 2 commits into
mainfrom
agent/cursor-background-browser-guard

Conversation

@yaacovcorcos

Copy link
Copy Markdown
Contributor

Summary

  • prevent Scient's background Cursor health, model-discovery, and ACP subprocesses from opening an authentication browser
  • use Cursor Agent's documented NO_OPEN_BROWSER variable while retaining the existing generic browserless guards
  • preserve the explicit user-triggered Connect flow unchanged

Root cause

Scient already attempted to make background Cursor processes browserless with NO_BROWSER=true, but Cursor Agent 2026.07.23-e383d2b checks the distinct NO_OPEN_BROWSER variable before launching its authentication page. An unauthenticated background models call could therefore open a browser unexpectedly.

Verification

  • focused provider/Cursor suites: 206 passed
  • bun run fmt:check
  • bun run lint (0 errors; existing warnings only)
  • bun run typecheck (9/9)
  • bun run test (12/12 tasks; CLI/server 2,330 passed and 9 skipped)
  • bun run build:desktop (5/5 tasks)
  • git diff --check
  • installed Cursor Agent manual check: with NO_OPEN_BROWSER=1, unauthenticated status and models returned without opening a browser

Scope and risk

The new flag is applied only through the shared environment for background/probe/ACP Cursor subprocesses. The explicit cursor-agent login command launched after a user clicks Connect does not use this environment and remains able to open authentication normally.

No UI or visual changes. No migration, persistence, credential, permission, packaging, updater, or release-control changes.

Overlap

Open PR #68 changes the broader provider connection UI and tests, but does not modify the shared Cursor browserless environment or the files changed here.

Rollback

Revert this PR to restore the previous environment. No stored state or migration rollback is required.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XS labels Jul 25, 2026
@yaacovcorcos

Copy link
Copy Markdown
Contributor Author

Parent planning documentation: Scient PR https://github.com/ScientFactory/Scient/pull/48. The Cursor item is intentionally absent from the open inbox because this PR implements it.

@yaacovcorcos
yaacovcorcos marked this pull request as ready for review July 25, 2026 12:22
@yaacovcorcos
yaacovcorcos merged commit dab9b6d into main Jul 25, 2026
10 checks passed
@yaacovcorcos
yaacovcorcos deleted the agent/cursor-background-browser-guard branch July 25, 2026 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant