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.
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.
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.