Cursor doesn't work reliably when using mise

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

I am using Mise to manage dependency versions.

As Cursor doesn’t create a login shell, Mise isn’t loaded automatically.

I added ~/.cursor/hooks/mise-shell.sh which solves this problem.

The issue is that Cursor can break at one point and it starts to show “Canceled: Canceled” for all hook calls. I have to restart Cursor to make mise with hooks work again.

Steps to Reproduce

I don’t know how to reproduce the hooks starting to break.

Operating System

MacOS

Version Information

Version: 3.8.11 (Universal)
VS Code Extension API: 1.105.1
Commit: e56ad3440df06d22ca7501e65fd518e905486ef0
Date: 2026-06-18T01:40:18.333Z
Layout: glass
Build Type: Stable
Release Track: Default
Electron: 40.10.3
Chromium: 144.0.7559.236
Node.js: 24.15.0
V8: 14.4.258.32-electron.0
xterm.js: 6.1.0-beta.256
OS: Darwin arm64 25.5.0

For AI issues: which model did you use?

Auto

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Hey @afsuk

Thanks for the report!

On the hooks failing, that’s not great. Next time it happens, could you try Cmd+Shift+P → Restart Extension Host and let me know if that alone brings the hooks back? Hooks run in the extension host, so if a restart fixes it that points the blame squarely there and helps us narrow it down.

On mise itself, you shouldn’t actually need a hook for this. The agent runs commands in a non-login, non-interactive shell, and the standard mise activate relies on a per-directory shell hook (chpwd) that never fires there. So the agent ends up frozen on whatever versions were resolved when Cursor launched, rather than your project’s pinned versions.

The fix is to use shims, which resolve the correct tool version at run-time regardless of shell type. mise recommends exactly this for editors (IDE integration docs).

The one thing that matters is that the shims dir ends up first on PATH, ahead of any hook-mode entries or other version managers. The most reliable way is to add this as the last line of your ~/.zshrc, after any existing setup and restart Cursor.

export PATH="$HOME/.local/share/mise/shims:$PATH"

Thanks for the reply. Unfortunately binaries are only one side of the problem, I also rely on mise setting environment variables hence using a hook.

Thanks for the context!

  • When it next happens, does Cmd+Shift+P → Restart Extension Host recover it without a full restart? That tells us whether it’s the extension host wedging.
  • Could you grab logs from around when it breaks? Cmd+Shift+P → Developer: Open Logs Folder, and the Output panel channels for the agent/hooks would be ideal.
  • Does it affect all hooks at once, or just some?