Cursor hangs executing a snippet "agent is waiting for a command"

Hey, this is a known class of bugs with command completion detection in the agent terminal. The command actually runs, but Cursor doesn’t get the completion signal via shell integration or the fd 3 bootstrap handshake, so the agent gets stuck on waiting for a command to finish. The issue is being tracked, but there’s no ETA for a fix yet.

A workaround that usually helps right now:

  • Cursor Settings > Agents > enable Legacy Terminal

This mode uses an older completion detection method and avoids the broken path.

To better match your case to the bug, please share:

  • Your OS and Cursor version via Help > About or Cursor > About Cursor
  • Which shell you use zsh, bash, fish, or pwsh, and whether you use oh-my-zsh, powerlevel10k, starship, etc. Some prompt themes strip OSC sequences that are needed for detection.

Related threads for context:

Let me know if Legacy Terminal helps.