Talking to a running turn
A line you type while a turn is running goes into that turn instead of starting another. The agent takes the line into account rather than being restarted with it. That is the difference between saying "actually, use pathlib" four minutes into a refactor and saying it after the refactor has finished.
Try it
While a turn is running, type a line at the prompt and press enter. There is no separate mode and no separate key.
Your line stays pinned against the agent it went to:
❯ and fix the tests too · with claude#3a15It comes off the pin only when that agent's turn says the words are in front of it.
At the prompt
Type a line and press enter. There is no separate mode and no separate key. The editor means both things at once.
If no turn is open, the line is held for the next one. A line to a running flow is never dropped.
A held line is pinned onto the editor, not written into the transcript. It is dimmed, behind the same ❯:
❯ and fix the tests too assistant · claude-opus-5:high
❯ then push 12.3k tokens · 84/s
────────────────────────────────────────────────────────────────────────
❯ █The line has not been said to anybody yet. The transcript is what happened. When something takes the line, it comes off the pin and into the transcript, in front of the turn that took it.
Handed to a backend is not the same as taken
A line put into a turn that is already running also stays pinned, this time against the agent it went to:
❯ and fix the tests too · with claude#3a15It comes off only when that agent's own turn says the words are in front of it. A turn that ends without saying so puts the line back into the transcript as never sent. A line typed at an agent that was not listening is never quietly counted as said.
One at a time, in order
Everything you type joins one queue and leaves it a line at a time. The next line goes only once the turn has said it has the one before it. A turn takes one waiting line, not the whole queue. Three hi in a row are three things said, and they come back as three answers.
It reaches the conversation you are reading
Your line reaches the conversation you are reading, not whichever agent happens to be working. An agent may hold one conversation you are reading while taking a turn in another. A line said to the wrong one is a line said to somebody else. See Many conversations at once.
What each backend does with it
| Backend | What a mid-turn line does |
|---|---|
| Claude Code | Answered within the same turn. The turn is over once the agent has answered everything it was told, not when it first stops. |
| Codex | A steer on the turn its app server is running. |
| Kimi Code | Queued, then steered into the turn already running. |
| pi | A steer on the run it is making, taken into it rather than answered after it. |
| opencode, mimocode | Nothing: a run per turn has ended by the time there is anything to say to it. |
An anchored Claude ends its process with each turn so its work reaches the target before the turn says it landed. It hears you during a turn as any Claude does. Between two turns there is nothing there to hear, so interject raises RuntimeError until the next turn opens. An anchored Codex keeps one app server for the life of the agent and can be steered throughout, at the cost of that same guarantee.
From Python
session.interject sends a line from Python:
session.interject("actually, use pathlib")- On a backend that takes a turn's whole prompt up front, this raises
NotImplementedError. - On a backend that can be talked to, it raises
RuntimeErrorwhen nothing is running to hear it.
Two related hooks, both set by whatever is driving the agent:
agent.waiting | Asked as each turn starts for anything said to this agent while no turn was open. What it returns goes into that turn. |
agent.prompting | Asked between turns for the next thing to say, so a flow can be a conversation rather than a loop. None once there will be nothing more. |
That pair is how the pin in the interface works. waiting drains the queue into the turn that is starting. prompting hands the flow the next thing to say.
See also
- Many conversations at once — which agent a line reaches
- Stopping — when a steer is not enough
- The person as an agent