pub const MID_RUN_PREAMBLE: &str = "The user sent a message while you were working";Expand description
The preamble that marks text as having arrived mid-run.
A mid-run message is not the same speech act as a fresh prompt: it may amend an earlier instruction, be an aside, or be an instruction for after the current work (“when you finish this, also…”). The model can only act correctly — including changing course inside the running loop — if it knows which. Unmarked, it reads as though it had been there from the start.
Grok Build ships the same marker and the same wording
(INTERJECTION_WIRE_PREFIX), and its PTY tests assert the distinction this
module preserves: the mid-run path carries the preamble, and a queued
message that lands as an ordinary next-turn prompt does not.