Where does the bug appear (feature/product)?
Cursor CLI
Describe the Bug
This snippet shows up many times in my zsh history file since I’ve started using cursor agent. The agent confirmed that it’s due to it’s configuring of the shell env.
set +o ignoreeof
set -o interactive-comments
set +o keyword
set +o monitor
set +o noclobber
set +o noexec
set +o noglob
set +o nolog
set +o notify
set +o onecmd
set +o physical
set -o pipefail
set +o posix
set +o privileged
set +o verbose
set +o vi
set +o xtrace
Steps to Reproduce
Run the agent with zsh history enabled, make it do any shell commands and look at history file.
Expected Behavior
Cursor CLI should make sure that these commands don’t bleed through into the history.
Operating System
Linux
Version Information
2026.02.27-e7d2ef6
For AI issues: which model did you use?
opus 4.5
Additional Information
It’s resolved on my side by HISTORY_IGNORE=“(set [±]o *)”, I don’t need any further support.
From cursor agent:
Found the issue. Cursor is using bash (/usr/bin/bash), not zsh - so your zshaddhistory hook never gets called. But somehow commands are still being written to your zsh history file.
This is likely Cursor's terminal integration syncing commands to your zsh history. Since you can't control Cursor's shell initialization, the cleanest solution is to periodically clean your history.
The solution isn’t really acceptable.
Does this stop you from using Cursor
No - Cursor works, but with this issue