Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Brief summary:
The agent’s shell tool starts a minimal non-login shell, so environment setup from ~/.zshrc (like activated Python/pixi environments) is never loaded.
Where it appears:
Agent mode shell tool when running git commit in any repo that uses pre-commit hooks requiring a pre-activated environment (e.g. pixi/conda/nvm-based toolchains).
Bug description:
The shell tool launches zsh without the -l (login) flag, so ~/.zshrc and ~/.zprofile are never sourced. Pre-commit hooks that check for an activated environment (e.g. PIXI_IN_SHELL, virtualenv, nvm) find nothing set and attempt a full bootstrap, which fails due to missing credentials or network restrictions in the sandbox. The same git commit succeeds instantly in any user-facing terminal because those shells inherit the fully-initialized environment. The fix would be to source the user’s shell init files (or run as a login shell) when the shell tool is invoked.
Steps to Reproduce
- Open a repo that uses pre-commit hooks requiring an activated environment (e.g. pixi/conda)
- Ask the Cursor agent to run git commit via the shell tool
- Hooks fail with environment activation errors
Expected Behavior
The agent’s shell tool should source the user’s login shell init files (~/.zshrc / ~/.zprofile) so pre-commit hooks have access to the same environment available in any user-facing terminal.
Operating System
MacOS
Version Information
Version: 3.0.13 (Universal)
VSCode Version: 1.105.1
Commit: 48a15759f53cd5fc9b5c20936ad7d79847d914b0
Date: 2026-04-07T03:05:17.114Z (1 day ago)
Layout: glass
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Darwin arm64 25.1.0
For AI issues: which model did you use?
Sonnet 4.6
Additional Information
The workaround is committing from the integrated terminal directly, where the environment is already active. The issue only affects the agent’s shell tool.
Does this stop you from using Cursor
No - Cursor works, but with this issue