Cursor Agent Terminal Doesn’t Work Well with Powerlevel10k + Oh-My-Zsh

I’m a macOS and Debian user, and my default shell environment is Oh-My-Zsh with the Powerlevel10k theme. While this setup works flawlessly in my native terminal, I’ve encountered a significant issue when using the Cursor Agent.

Whenever the agent tries to execute commands in the terminal (for example, during code explanation or command suggestions), the terminal session does not automatically detect when a command has finished. It just keeps waiting indefinitely. This only happens when Powerlevel10k is enabled.

I’ve tried creating a separate terminal profile with a more minimal Zsh setup and pointed to that profile in the global settings of Cursor, but it seems that Cursor Agent still uses the default system profile, not the one I explicitly set. The custom profile only works when I manually open the terminal from within Cursor, not when the agent runs commands automatically.

As a result, I’ve had to give up on using Powerlevel10k entirely just to get the agent to work—which is quite painful since I’ve customized my terminal environment heavily and rely on it daily.

Is anyone else experiencing this? Any workarounds or future fixes planned?

7 Likes

I’m also facing the same issue.

this started happening after version 0.51, had no issues on 0.50

2 Likes

Same here.

this started happening after version 0.51, had no issues on 0.50

Same here, I had to disable for now

Same here! Love my P10k, but Cursor seems to hate it!

same here, anyone have a workaround that works? I haven’t had any luck.

same here

I think an easy fix for this would be to have the user choose different terminals for the VSCode terminal panel and Cursor’s chat terminal. Or, alternatively, the Cursor’s chat terminal could just default to bash. Or, even more simply, there could be a well-documented flag set by cursor so I can suppress powerlevel10k in my .zshrc by checking if this flag is set.

AI Assistant Terminal Commands Never Auto-Complete · Issue #3215 · getcursor/cursor · GitHub try this, it’s worked for me. And I hope this can be fixed asap. I like my p10k theme

I put my solution to this in the following thread, it appears to work

1 Like

Thank you so much @ not-a-real-wolf , I solved this problem with this on Cursor 1.0.

if [[ -n $CURSOR_TRACE_ID ]]; then
  ZSH_THEME="robbyrussell"  # Use a simpler theme in Cursor
else
  ZSH_THEME="powerlevel10k/powerlevel10k"
fi

# Other things

if [[ ! -n $CURSOR_TRACE_ID ]]; then
  [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
fi

Anyway, the version for zinit(my case):

# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ ! -n $CURSOR_TRACE_ID ]]; then
  if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
    source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
  fi
fi

if [[ -n $CURSOR_TRACE_ID ]]; then
  zinit ice depth=1
  zinit light robbyrussell/oh-my-zsh
  zinit snippet OMZ::themes/robbyrussell.zsh-theme
else
  zinit ice depth=1
  zinit light romkatv/powerlevel10k
fi

Although the solution was to make Terminal in Cursor not use the P10K theme, which is not so elegant, this is a good solution right now.

Here’s a cleaner solution that keeps Powerlevel10k while fixing Cursor Agent detection.

Step 1: Download shell integration

curl -L https://iterm2.com/shell_integration/zsh -o ~/.iterm2_shell_integration.zsh

Step 2: Add to ~/.zshrc (only activates in Cursor Agent):

if [[ -n $CURSOR_TRACE_ID ]]; then
  PROMPT_EOL_MARK=""
  test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"
  precmd() { print -Pn "\e]133;D;%?\a" }
  preexec() { print -Pn "\e]133;C;\a" }
fi

Step 3: source ~/.zshrc and restart Cursor

This way you keep your beautiful P10k theme in normal terminal use, but Cursor Agent gets the proper command detection signals. The CURSOR_TRACE_ID check ensures it only affects Cursor sessions.

1 Like

cool! thanks!