Skip to content

fix(widgets): fix CLI launcher error 127 and hide Cursor sidebar button#59

Draft
keshav-k3 wants to merge 1 commit into
mainfrom
cursor/fix-cli-launcher-error127-a1a9
Draft

fix(widgets): fix CLI launcher error 127 and hide Cursor sidebar button#59
keshav-k3 wants to merge 1 commit into
mainfrom
cursor/fix-cli-launcher-error127-a1a9

Conversation

@keshav-k3

Copy link
Copy Markdown
Member

Summary

Fixes the Claude/Codex sidebar folder launchers failing with shell exit code 127 ("command not found") and hides the Cursor Agent launcher from the sidebar while keeping its implementation intact for later.

Root cause

The launcher widgets set cmd:interactive: true in block meta, but the Go backend never read that flag. Cmd blocks were started as non-login shells (zsh -c claude), which inherit the Electron app's minimal PATH and cannot find user-installed CLIs like claude, agent, or codex.

Fix

  • Backend: When cmd:interactive is set, pass login + interactive shell flags so commands run as zsh -lic claude (or equivalent), sourcing the user's shell profile and PATH.
  • Applies consistently for local, WSL, and SSH command execution paths.
  • Frontend: Hide the Cursor launcher from the sidebar via a CLI_LAUNCHER_SIDEBAR_HIDDEN flag and display:hidden in default widgets config — code and config remain for future re-enable.
  • UI polish: Clearer launcher copy, loading state on Open, disabled controls while launching, and accent button styling aligned with app conventions.

Test plan

  • go test ./pkg/shellexec/... -run TestAppendShellCommandOpts
  • Click Claude sidebar button → pick folder → claude launches without error 127
  • Click Codex sidebar button → pick folder → codex launches successfully
  • Confirm Cursor button is not visible in sidebar
  • Confirm recent-folder list still works and persists across sessions
Open in Web Open in Cursor 

The Claude/Codex sidebar launchers set cmd:interactive but the backend
never honored it, so commands ran as bare shell -c without login profile
sourcing and could not find user-installed CLIs (exit 127).

Wire cmd:interactive to login/interactive shell flags for cmd blocks and
apply the same flags when building -c invocations locally, over WSL, and
over SSH. Hide the Cursor launcher from the sidebar while keeping its
config and launcher code for later.

Co-authored-by: Keshav Kk <keshav-k3@users.noreply.github.com>
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.

2 participants