fix(orchestration): submit push-on-idle messages with split Enter

deliverPendingMessages was writing banner text to the PTY without
submitting it — the message sat in the agent's input field unprocessed.
Add the same 500ms delayed Enter used by dispatch --inject so the
agent actually receives and acts on delivered messages.

Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
Jinwoo-H
2026-04-27 23:46:55 -04:00
co-authored by Orca
parent 4179d3d347
commit e284b72fd9
+6
View File
@@ -1925,6 +1925,12 @@ export class OrcaRuntimeService {
const wrote = this.ptyController?.write(leaf.ptyId, payload) ?? false
if (wrote) {
this._orchestrationDb.markAsRead(unread.map((m) => m.id))
// Why: Claude Code treats large single PTY writes as paste events and
// swallows a \r included in the same write. Send Enter separately after
// a delay so the agent processes the pasted message first.
setTimeout(() => {
this.ptyController?.write(leaf.ptyId, '\r')
}, 500)
}
}