# AI CLI Cheatsheet — Queue & Steering Messages
## Synopsis
How to add messages while an agent is mid-run, in the three TUIs.
## Concepts
- **Queue (follow-up)**: message waits until the agent *finishes all pending work*, then gets delivered.
- **Steering**: message is injected *mid-run* — after the current turn's tool calls finish, before the next LLM call — redirecting the agent without losing its current context.
- **Interrupt**: hard-abort the current run, then talk to the agent fresh.
## Pi
| Action | Keys (Windows / macOS & Linux) | Effect |
|---|---|---|
| Steer | type message + `Enter` while running | Delivered after current turn's tool calls, before next model call |
| Queue follow-up | `Ctrl+Q` / `Alt+Enter` | Delivered only after the agent fully stops |
| Dequeue | `Alt+Q` / `Alt+Up` | Pull queued messages back into the editor |
| Abort run | `Esc` | Stops run; queued messages return to the editor |
## Claude Code
| Action | Keys | Effect |
|---|---|---|
| Queue | type message + `Enter` while running | Message sits as "queued"; delivered when current task finishes |
| Steer | `Esc` to interrupt, then type + `Enter` | Stops current work; agent responds to new instruction immediately |
| Rewind | `Esc` `Esc` | Jump back to an earlier point in the conversation |
## OpenCode
| Action | Keys | Effect |
|---|---|---|
| Steer | type message + `Enter` while running | Injected into the current run immediately |
| Queue | type message + `Ctrl+X` `Enter` | Queued; processed after the current task finishes |
| Abort | `Esc` | Interrupt the current run |
## Rule of thumb
- **Pi**: `Enter` = steer, `Ctrl+Q` = queue — no need to interrupt first.
- **OpenCode**: `Enter` = steer, `Ctrl+X Enter` = queue.
- **Claude Code**: `Enter` = queue; to steer you must `Esc` first, then send.