Skip to content

fix(cli): inject SPAWN_CLI_DIR in dev script so local source is always used#3429

Merged
la14-1 merged 2 commits into
cursor-proxy/fix-error-reportingfrom
cursor-proxy/dev-cli-dir
May 22, 2026
Merged

fix(cli): inject SPAWN_CLI_DIR in dev script so local source is always used#3429
la14-1 merged 2 commits into
cursor-proxy/fix-error-reportingfrom
cursor-proxy/dev-cli-dir

Conversation

@aulorbe
Copy link
Copy Markdown
Collaborator

@aulorbe aulorbe commented May 21, 2026

Summary

When running bun run dev from packages/cli, the CLI downloads the spawn script from the published CDN release instead of using local source. This means any unpublished branch fixes (e.g. the macOS compatibility changes in cursor-proxy/macos-compat) are silently ignored — the terminal shows errors from the old published code while the fixes sit unused on disk.

The visible symptom is bun run dev printing "Downloading spawn script..." and then running stale code with already-fixed bugs (wrong Caddy install path, setsid instead of nohup, missing sudo for /etc/hosts).

Fix

Set SPAWN_CLI_DIR to the repo root (via git rev-parse --show-toplevel) in the dev script so the local checkout is always used during development.

Test plan

  • Run bun run dev from packages/cli, verify "Downloading spawn script..." no longer appears
  • Verify the local source is used (e.g., local fixes are reflected in behavior)

…s used

Without SPAWN_CLI_DIR, `bun run dev` downloads the spawn script from
the published CDN release, ignoring any local source changes. This is
especially confusing when developing on a branch with fixes that
haven't been published yet.

Set SPAWN_CLI_DIR to the repo root (via git rev-parse) in the dev
script so the local checkout is always used during development.
)

Add a section to sh/local/README.md noting that the "Custom model"
setup option must be selected to get the OpenRouter model picker when
spawning Cursor locally, and that only Cursor IDE-supported providers
work (linking to Cursor's supported providers docs).
@la14-1 la14-1 merged commit 0ee1360 into cursor-proxy/fix-error-reporting May 22, 2026
1 check was pending
@la14-1 la14-1 deleted the cursor-proxy/dev-cli-dir branch May 22, 2026 00:38
la14-1 pushed a commit that referenced this pull request May 22, 2026
…3428)

* fix(cursor-proxy): fix double-wrapped Result hiding setup failures

The error handling in setupCursorProxy and startCursorProxy used
asyncTryCatchIf(isOperationalError, () => wrapSshCall(...)) which
double-wrapped the Result: wrapSshCall returns Err() on failure
(doesn't throw), so asyncTryCatchIf always saw a successful return
and wrapped it in Ok(Err(...)). This meant result.ok was always
true, causing misleading output like "Cursor proxy started" even
when every step failed.

Fix: call wrapSshCall directly and check its returned Result.
Also adds macOS DNS cache flush after /etc/hosts modification and
early-return on deploy/hosts failure with accurate warning messages.

* fix(cli): inject SPAWN_CLI_DIR in dev script so local source is always used (#3429)

* fix(cli): inject SPAWN_CLI_DIR in dev script so local source is always used

Without SPAWN_CLI_DIR, `bun run dev` downloads the spawn script from
the published CDN release, ignoring any local source changes. This is
especially confusing when developing on a branch with fixes that
haven't been published yet.

Set SPAWN_CLI_DIR to the repo root (via git rev-parse) in the dev
script so the local checkout is always used during development.

* docs(cursor): add model picker and provider notes for local spawn (#3431)

Add a section to sh/local/README.md noting that the "Custom model"
setup option must be selected to get the OpenRouter model picker when
spawning Cursor locally, and that only Cursor IDE-supported providers
work (linking to Cursor's supported providers docs).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants