Skip to content

Send now on a working Claude pane only queues the message in Claude Code (Enter vs Ctrl+Enter) #737

Closed

Description

@Yoonwoo-Ha

What happens

In a Claude Code pane, a message held while Claude works and sent with Send now does not go at once. Claude Code puts it in its own queue, and the terminal shows:

  ctrl+enter to send now
────────────────
❯ Press up to edit queued messages

The message then waits for the end of Claude's turn, which is what a plain held message does anyway. So Send now behaves like "next turn" for Claude, while the changelog says it delivers immediately.

Why

dispatchPendingText (server/index.ts) commits every message with a pasted body and then paneSendKeys(paneId, ["Enter"]), including the steer case it already identifies with committing(!automatic && beforeEnter.working).

Claude Code (2.1.29x) takes a plain Enter during a turn as "queue this message", and Ctrl+Enter as "send it now". #471 already handles this for the live terminal: Ctrl+Enter typed there reaches Claude Code as Ctrl+Enter (modifyOtherKeys) "so a message typed while it works is sent at once instead of waiting in its queue". The chat's Send now never sends that key.

Reproduction

Claude Code 2.1.294 (Haiku 4.5), in an isolated herdr session, with the keys sent through herdr's API the way the bridge sends them:

  1. Ask for a long answer ("Write a 1200-word story… No tools."), so the turn runs for a while.
  2. While it runs, paste reply only with the word PING (bracketed paste), then send Enter.
    • The message is queued. The screen shows ctrl+enter to send now / Press up to edit queued messages, and the story goes on.
  3. In the same state, paste reply only with the word PONG, then send herdr's key ctrl+enter (pane.send_keys).
    • It goes at once: Claude stops the story and answers PONG.

The xterm encoding Claude asked for (ESC [ 27 ; 5 ; 13 ~, sent as text) also sent a queued message at once.

Possible fix

For a Claude pane, when Send now steers a working turn (!automatic && beforeEnter.working), commit with ctrl+enter instead of Enter. Keep Enter everywhere else: automatic next-turn delivery, an idle agent, and other agents.

I haven't opened a PR, since this is the guarded pending-delivery path and you may want to decide how it fits the delivery invariants. I'm running that change locally and can open a PR with a test if you'd like it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions