fix(cursor-proxy): skip proxy setup when running on local cloud#3424
Closed
aulorbe wants to merge 2 commits into
Closed
fix(cursor-proxy): skip proxy setup when running on local cloud#3424aulorbe wants to merge 2 commits into
aulorbe wants to merge 2 commits into
Conversation
This was referenced May 20, 2026
Collaborator
Author
475ef82 to
348d71a
Compare
348d71a to
5f193ec
Compare
1 task
louisgv
previously approved these changes
May 21, 2026
cdd5fe8 to
8661ab2
Compare
5f193ec to
4f96dbc
Compare
setupCursorProxy and startCursorProxy modify /etc/hosts and install system services assuming they're on a remote VM. When the local cloud runner is used (spawn local cursor), these run directly on the host, breaking the user's real Cursor installation. Add an isLocal guard that short-circuits both functions when running locally. Also fix flaky digitalocean-token test assertion (toBe(2) → toBeGreaterThanOrEqual(2)).
4f96dbc to
7a5cf90
Compare
- Detect OS/arch at runtime for cross-platform Caddy installation - Install Caddy to ~/.local/bin (user-writable on all platforms) - Fix /etc/hosts configuration to work on both macOS and Linux - Replace setsid (Linux-only) with nohup (POSIX) - Ensure ~/.local/bin is in PATH for Caddy commands - Add comprehensive comments explaining platform-specific choices Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Summary
setupCursorProxyandstartCursorProxymodify/etc/hostsand install system-level services (Caddy, Node proxy scripts) assuming they run on a remote VM. When thelocalcloud runner is used (spawn local cursor), these commands execute directly on the host machine, breaking the user's real Cursor installation by redirectingapi2.cursor.shto127.0.0.1and overwritingCURSOR_API_KEYwith an OpenRouter key.isLocalflag fromlocal/agents.tsthroughcreateCloudAgents→createAgents→ cursor agent config closures. Both proxy functions now short-circuit with a warning whenisLocalis true.Test plan
cursor-proxy.test.tspasses (proxy setup/start tests unaffected — they use a mock runner, not local)