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
af send: Enter (\r) doesn't submit multi-line formatted messages #492
This gets written to the PTY as a single session.write(formattedMessage + '\r'). The PTY/terminal processes the embedded \n characters as line breaks. By the time the trailing \r arrives, the cursor is on an empty line after the ### footer. The \r submits that empty line, not the message content.
This is fundamentally different from how the terminal handles human input — Claude Code sees a multi-line paste event and displays it, but the trailing \r just adds a blank Enter after the display.
Why Cron Messages Work
Cron messages (af-cron) also use the same format and \r, but they appear to work because the Claude Code process treats the pasted block as input regardless — the message content itself triggers the AI to respond. The \r was never actually submitting the message; it was always just adding a blank line.
History
Originally the Enter was sent as a separatesession.write('\r') — intermittently lost between shellper DATA frames
Send \r before the message: Write '\r' + formattedMessage + '\r' so the first Enter clears any partial input, then the message is pasted, then the final Enter submits
Send \r\n at the end: Some terminals need \r\n rather than just \r
Investigate how Claude Code handles pasted input: Maybe there's a bracket-paste mode issue where the message needs to be wrapped in paste markers
Activity
waleedkadous commentedon Feb 21, 2026
On it! Working on a fix now.
Fix #492: Remove composing flag from send deferral logic
Merge pull request #496 from cluesmith/builder/bugfix-492-af-send-typ…
[-]af send typing awareness over-fires: messages delayed 60s[/-][+]af send: Enter (\r) doesn't submit multi-line formatted messages[/+][Bugfix #492] Fix af send Enter not submitting: delay \r after multi-…
[Spike 1265] Round-7 review: cron reroute moved to phase 1; convergen…