cursor_snap_ENV_VARS: zsh + dump_zsh_state issue

Hey, thanks for the report. This issue is related to shell initialization in the agent terminal.

A few questions for diagnostics:

  1. Are you working locally or over SSH?
  2. Do you have exec zsh or exec bash in your .zshrc, .zshenv, or .bash_profile?
  3. Are you using iTerm2 with shell integration? (Check for .iterm2_shell_integration.zsh)

Try these fixes:

If you have exec zsh in .bash_profile, add a guard:

if [[ -n "$CURSOR_AGENT" ]]; then
  :
else
  exec zsh
fi

If you’re using iTerm2 integration, try commenting out this line in .zshrc temporarily:

test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"

Similar fix: AI Terminal over SSH fails with `dump_bash_state: command not found` and random "command not found" lines

Let me know if this helps.

1 Like