The trailing CR that submits orchestrator-injected input was written only 15ms after the body, inside TUI agents' paste-coalescing window, so codex (and other paste-detecting agents) intermittently swallowed it as a newline and left the message composed but unsent. Centralize the per-piece timing in a pure pieceWriteDelay helper: keep 15ms between body lines but give the final lone Enter a 100ms settle gap so the agent closes the preceding burst and registers the CR as submit. Covers send_input, send_message, timers, and the spawn initial prompt (all go through writeInput). Resolves the codex composer-submit TODO item.
18 KiB
18 KiB