You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
chat: an immediate Send is pasted over a draft in Claude Code's input box (herdr agent.prompt path) #629
Follow-up to #609 (fixed for queued messages by #628).
What happens
An immediate chat Send to an idle agent does not go through the bridge's pending-message delivery. submitText in server/index.ts hands the text to herdr's agent.prompt, which pastes it into the agent's input box and presses Enter 300 ms later. Nothing checks the box first. If the user left a draft in the terminal's input box (or Claude Code is in bash mode, !), the chat text joins that draft and the Enter sends both as one message, or runs the result as a shell command in bash mode.
#628 adds claudeInputDraft() (server/prompt.ts) and refuses a queued delivery with input_draft while the box is not empty. The immediate path was left out because the paste and the Enter happen inside herdr's agent.prompt.
Options
Run the same check in submitText before agentPrompt for a Claude pane, and refuse with input_draft (the composer keeps the text, the client already treats the code as "nothing typed" after fix(chat): hold a queued message rather than paste it over a Claude draft #628). A race remains between the check and herdr's paste, as it does for the queued path.
Ask herdr for an agent.prompt option that refuses when the input box is not empty, where the check and the paste cannot race.
Option 1 is small and matches #628; option 2 needs herdr.
Activity
chore(release): 0.4.3 (#664)
fix(chat): refuse immediate sends over Claude input drafts (#677)
chore: sync with upstream main (v0.4.5, devswha#711) (merge commit, d…
chore: record upstream v0.4.5 in the fork's history (MERGE COMMIT onl…
fix(chat): refuse a send over text typed in omp's own box (#3835)