GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(cursor): reject desktop launcher forwarders by christopheraaronhogg · Pull Request #4371 · pingdotgg/t3code

Conversation

@christopheraaronhogg

@christopheraaronhogg christopheraaronhogg commented Jul 23, 2026 •
edited by macroscopeapp Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

What Changed

  • Resolve the configured Cursor Agent command before provider health checks.
  • Inspect only small wrapper scripts and reject shims that forward to cursor agent, the desktop editor launcher.
  • Return a clear standalone-CLI setup error without spawning the shim.
  • Add regression coverage for Windows batch and POSIX shell forwarders, including a no-spawn assertion.

Why

Cursor's supported standalone command is cursor-agent. A local shim such as cursor-agent.cmd containing cursor agent %* launches the desktop editor instead of ACP. T3's five-minute provider refresh then opens Cursor repeatedly and can leave expensive editor processes running.

This is a follow-up safety guard to #4094 and covers the desktop-launcher failure mode reported in #2516. Correct standalone Cursor CLI binaries and ordinary wrappers remain unchanged.

Official CLI installation: https://cursor.com/docs/cli/installation

Verification

  • vp test run apps/server/src/provider/Layers/CursorProvider.test.ts -t 'rejects desktop forwarder|recognizes shell wrappers'
  • vp lint apps/server/src/provider/Layers/CursorProvider.ts apps/server/src/provider/Layers/CursorProvider.test.ts --report-unused-disable-directives
  • vp fmt --check apps/server/src/provider/Layers/CursorProvider.ts apps/server/src/provider/Layers/CursorProvider.test.ts
  • vp run --filter t3 typecheck

The full Cursor provider test file also runs 22/25 tests on native Windows; its three existing ACP fixture tests fail with spawn EFTYPE because they execute .sh wrappers directly. The new tests pass on native Windows.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • No UI changes

Note

Low Risk
Scoped guard in Cursor provider status checks with file-size limits; legitimate standalone CLI binaries are unchanged.

Overview
Cursor provider health checks now block desktop-launcher shims so periodic refreshes no longer spawn wrappers that open the editor instead of ACP.

Before agent about, checkCursorProviderStatus resolves the configured binary with resolveCommandPath, reads only small regular files (≤64 KiB), and uses isCursorDesktopAgentForwarderScript to detect batch/shell scripts that forward to cursor agent. Matches return installed: false, status: "error", and a message pointing users to the standalone cursor-agent CLI—without executing the shim.

Regression tests cover POSIX/Windows forwarder patterns, the script predicate (including commented lines), and a no-spawn assertion when a forwarder is configured.

Reviewed by Cursor Bugbot for commit b1069cd. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Reject desktop launcher forwarder scripts in checkCursorProviderStatus

  • Adds isCursorDesktopAgentForwarderScript to detect shell/batch wrappers that forward to the cursor agent desktop launcher via a case-insensitive regex.
  • Adds an early guard in checkCursorProviderStatus that reads the configured binary, checks if it is a forwarder script, and returns an error probe with installed=false without spawning any subprocess.
  • Behavioral Change: configs pointing to a desktop forwarder shim now immediately fail with a user-facing message instead of attempting to spawn the agent.

Macroscope summarized b1069cd.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@christopheraaronhogg
fix(cursor): reject desktop launcher forwarders
ad61bd0
@coderabbitai

coderabbitai Bot commented Jul 23, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e8ce2a77-492b-4b4c-8044-7a646619ee5f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
  • X
  • Mastodon
  • Reddit
  • LinkedIn

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Jul 23, 2026
macroscopeapp[bot]
macroscopeapp Bot reviewed Jul 23, 2026
View reviewed changes
Comment thread apps/server/src/provider/Layers/CursorProvider.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

cursor[bot]
cursor Bot reviewed Jul 23, 2026
View reviewed changes

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ad61bd0. Configure here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread apps/server/src/provider/Layers/CursorProvider.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@christopheraaronhogg
test(cursor): cover unquoted launcher paths
b1069cd
chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Jul 23, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ad61bd01e4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread apps/server/src/provider/Layers/CursorProvider.ts Outdated
}

export function isCursorDesktopAgentForwarderScript(script: string): boolean {
return /^[^\S\r\n]*(?!(?:#|::|rem(?:[^\S\r\n]|$)))(?:(?:exec|@?call|&)[^\S\r\n]+)?@?(?:"[^"\r\n]*[\\/]cursor(?:\.exe|\.cmd|\.bat)?"|cursor(?:\.exe|\.cmd|\.bat)?)[^\S\r\n]+agent(?:[^\S\r\n]|$)/im.test(

@chatgpt-codex-connector chatgpt-codex-connector Bot Jul 23, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Match unquoted Cursor launcher paths

When a shim calls the desktop cursor binary through an unquoted path, such as exec /usr/local/bin/cursor agent "$@" or C:\...\cursor.exe agent %*, this pattern returns false because the unquoted branch only accepts the bare command name cursor. Those wrappers then fall through to runCursorAboutCommand, so provider refresh can still spawn the desktop launcher that this guard is intended to reject.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@christopheraaronhogg christopheraaronhogg Jul 23, 2026

Copy link
Copy Markdown
Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in b1069cd. The detector now accepts unquoted POSIX and Windows paths; regression tests cover /usr/local/bin/cursor and C:\tools\cursor.exe.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@macroscopeapp

macroscopeapp Bot commented Jul 23, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

This PR introduces new validation logic that changes runtime behavior by rejecting certain Cursor configurations. An unresolved review comment questions whether the regex correctly handles all forwarder patterns, which warrants human verification.

You can customize Macroscope's approvability policy. Learn more.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

sheehanmunim added a commit to munimtechnologies/mtcode that referenced this pull request Aug 18, 2026
@sheehanmunim @claude
port upstream pingdotgg#4371: reject Cursor desktop launcher forwarde…
71fd551
…r shims

Detects wrapper scripts that forward to the Cursor desktop editor
launcher and reports a clear standalone-CLI setup error instead of
spawning the editor.

Co-Authored-By: Claude Fable 5 <[email protected]>
@juliusmarminge

juliusmarminge commented Sep 19, 2026

Copy link
Copy Markdown
Member

Thanks for the PR. We're not taking changes to the orchestration and provider layers right now: that part of the server is being rewritten for V2, and merging into the current code would either conflict with or be thrown away by that work.

Closing for now. If this is still an issue once V2 lands, please reopen (or open a fresh PR against the new code) and we'll take a proper look.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge juliusmarminge closed this Sep 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@macroscopeapp macroscopeapp[bot] macroscopeapp[bot] left review comments
@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments
@cursor cursor[bot] cursor[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@christopheraaronhogg @juliusmarminge
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.