Cursor CLI does not submit a bracketed-pasted prompt when Enter arrives in the same PTY input chunk

Where does the bug appear (feature/product)?

Cursor CLI

Describe the Bug

I maintain Herdr, an open-source terminal multiplexer for coding agents: GitHub - ogulcancelik/herdr: agent multiplexer that lives in your terminal. · GitHub. We reproduced this while investigating agent prompt doesn’t submit for cursor agent · Issue #1869 · ogulcancelik/herdr · GitHub and traced it to Cursor CLI’s handling of trailing bytes after a bracketed-paste terminator. Herdr sends a valid PTY byte stream; the problem is Cursor depending on input chunk boundaries, which PTYs do not preserve. I can provide further terminal captures or help test a fix.

When Cursor CLI receives a complete bracketed-paste sequence followed immediately by Enter in the same PTY write, it inserts the text but does not submit it. A second input event causes the pending Enter to be processed.

Steps to Reproduce

Steps to Reproduce

  1. Start Cursor CLI in a Herdr pane.
  2. Wait for the input prompt.
  3. Run:
      herdr agent prompt <target> "Reply with exactly OK"
    
  4. The text appears in Cursor’s input field, but no turn starts.
  5. Run:
      herdr agent send-keys <target> enter
    
  6. The original prompt now submits.

Herdr sends the valid byte stream ESC[200~ESC[201~\r in one PTY write.

Expected Behavior

Cursor CLI should process the Enter following the bracketed-paste terminator and submit the prompt, regardless of how the PTY groups bytes into input chunks.

Operating System

MacOS
Linux

Version Information

CLI Version 2026.07.23-e383d2b
Model Auto
Subscription Tier Free
OS linux (x64)
Terminal ghostty
Shell zsh

Additional Information

This appears to be an input-boundary bug. Cursor’s bundled use-text-input handler extracts bytes following ESC[201~, stores them for the next input event, and returns. When
those trailing bytes contain Enter, submission waits indefinitely for another event. PTYs are byte streams and do not preserve write or event boundaries. Other terminal
applications process the trailing Enter immediately.

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Hey, thanks for the detailed report. Your root-cause analysis and repro steps really helped. We reproduced it on our side: when the bracketed-paste terminator and Enter arrive in the same PTY write, the trailing Enter doesn’t get processed until the next input event. Your analysis is spot on.

I’ve reported this internally to the team. I can’t share an ETA for the fix yet, but I’ll post an update in this thread as soon as I have one.

And yes, we’d love help with a test. Please keep your terminal captures ready. Once we have a candidate fix, I’ll come back here so we can run it through Herdr. Thanks for digging into the cause.