Harness Notes

Steering

Updated 2026-11-24,

On this page

How to redirect, queue, stop or question an agent while it works, and how tools and extensions can feed it context. Each entry says when the input lands, what happens to running tools, and whether you can see it afterwards. Columns show each harness's main surface first, then its other surfaces.

You want toCodex CLIterminalCodex CLIApp Server API
Change direction mid-turn
TUI composer: Enter while a turn runs

Lands before the next model call; lets running tools finish; may skip tool calls not yet started; kept in the transcript.

Sent as turn/steer; same core semantics as the App Server entry, including instant_interrupt preemption.

Shown as 'Messages to be submitted after next tool call' until committed.

If the turn is not steerable (review/compact), the message is kept and resubmitted at the end of the turn.

If only user '!' shell commands are running, the message is queued instead.

0.163.0 release notes confirm immediate follow-up steering is enabled by default. This preempts the model response; it is distinct from explicitly interrupting the turn.

TUI: Esc while steers are pending

Takes effect immediately; may stop running tools; skips remaining tool calls; kept in the transcript.

The preview hint reads '(press Esc to interrupt and send immediately)'. This interrupts the turn, then merges all pending steers into one new turn.

Shows 'Model interrupted to submit steer instructions.'

Blocked during /review.

App Server JSON-RPC turn/steer

Lands before the next model call; lets running tools finish; may skip tool calls not yet started; kept in the transcript.

Requires expectedTurnId; rejected with no active turn, on a mismatch, during review/compact turns (ActiveTurnNotSteerable), and for empty input or a different output schema.

Queued into the active turn's pending input. All pending steers are drained together before the next model request, after in-flight tools finish.

instant_interrupt (default on in 0.162.1, still 'under development') cuts the current model response short when user input arrives. Started tools still finish, but tool calls the model had not yet emitted are lost.

UserPromptSubmit hooks run on steered input and can block it.

Optional experimental additionalContext and responsesapiClientMetadata.

0.163.0 release notes confirm immediate follow-up steering is enabled by default. This preempts the model response; it is distinct from explicitly interrupting the turn.

Queue a follow-up
TUI composer: Tab while a turn runs

Waits until the turn ends; lets running tools finish; kept in the transcript.

Queues prompts, slash commands (parsed when they run) and ! shell commands in a TUI-local in-memory queue. Each one starts a new turn, one per idle.

Alt+Up or Shift+Left pops the last queued item back into the composer for editing. There is no reordering.

On interrupt, queued items are restored to the composer, not sent.

CLI: codex queue --thread <UUID|name> --message <TEXT>

Waits until the turn ends; lets running tools finish; kept in the transcript.

Sends thread/queue/add to the shared daemon or --remote. It refuses --no-daemon and an embedded server while a daemon is running.

Text only; image attachments are not supported by the docs, although -i is listed in --help.

Starts a new turn when the target goes idle, but not after an interrupt. Reordering is only possible through the App Server API.

App Server JSON-RPC thread/queue/* (experimental)

Waits until the turn ends; lets running tools finish; kept in the transcript.

Durable, SQLite-backed queue. The head item starts a new turn (turn_trigger 'queue') when the thread goes idle, one item per idle.

No automatic dispatch after an interrupt-caused idle; thread/queue/start sends an item manually.

Supports list/update/delete/reorder and the thread/queue/changed notification. Requires the experimentalApi opt-in.

Stop it
TUI: Esc (chat.interrupt_turn) while running

Takes effect immediately; may stop running tools; skips remaining tool calls; kept in the transcript.

Sends turn/interrupt, with the same core effects as the App Server entry.

The TUI prints 'Conversation interrupted' and restores queued and unsent steers into the composer.

The key can be remapped. Esc does not interrupt while popups are open, in vim insert mode, or while typing /agents.

0.163.0 release notes: explicit turn interruption also stops active Code Mode cells and their nested tool calls. Detached background processes may keep running.

App Server JSON-RPC turn/interrupt

Takes effect immediately; may stop running tools; skips remaining tool calls; kept in the transcript.

Cancels the turn token, allows a 100 ms grace period, then aborts the task. Spawned children are kill_on_drop, but unified-exec/background processes may keep running.

Pending steers for the turn are discarded.

Records a model-visible turn-aborted marker (contextual-user, or developer for multi-agent V2) unless agent_interrupt_message_enabled is false; then the Interrupt hook runs.

Responds after TurnAborted; the turn ends with status interrupted.

0.163.0 release notes: explicit turn interruption also stops active Code Mode cells and their nested tool calls. Detached background processes may keep running.

Ask a side question
TUI slash command /side (alias /btw), optional inline text

Answered separately; the main run is untouched; lets running tools finish; shown on screen only.

Opens an ephemeral thread/fork of the main chat. The main turn keeps running and its status stays visible.

Injects a hidden boundary user message plus developer instructions: inherited history is reference only, no mutations unless explicitly asked, no sub-agents.

Only one side chat at a time; Ctrl+C returns to the parent. Unavailable before the first message, inside another side chat, and during review. The answer never enters the main transcript.

0.163.0 release notes report that /side can return to an existing side conversation after switching threads; answers to pending prompts return to the thread that asked.

App Server JSON-RPC thread/fork {ephemeral:true}

Answered separately; the main run is untouched; lets running tools finish; shown on screen only.

There is no dedicated side-question API; this is a building block. The TUI /side uses it plus thread/inject_items and developer instructions.

Forking a mid-turn parent records an interruption marker in the fork only; the parent keeps running.

Feed it context (hooks, extensions, APIs)
Background (async: true) command hooks

Lands at a safe point; lets running tools finish; hidden from you.

Same core path as the App Server entry.

The TUI hides hook runs that completed with only context entries.

Synchronous hooks

Arrives when its event fires; lets running tools finish; may skip tool calls not yet started; hidden from you.

Same as the App Server entry; context-only runs are quiet in the TUI.

Background (async: true) command hooks

Lands at a safe point; lets running tools finish; shown on screen only.

When a turn is active, results are drained after the current sampling request and its tools finish, then injected for the next model request.

When idle, results wait for the next user turn (recorded before the prompt). Finishing a hook never starts a turn.

additionalContext becomes a developer message; systemMessage becomes a warning.

Entries are exposed to clients in hook/completed.

Cannot block, approve or rewrite. At most 8 background hooks run concurrently per session.

Synchronous hooks (SessionStart, UserPromptSubmit, PostToolUse, Pre/PostCompact, SubagentStart/Stop, Stop)

Arrives when its event fires; lets running tools finish; may skip tool calls not yet started; shown on screen only.

additionalContext is recorded as developer messages at the hook's own lifecycle point and is seen by the next model request.

Hooks that can stop (UserPromptSubmit block, PostToolUse/Stop stop) change the turn. Default limit is about 2500 tokens (additionalContextLimit).

App Server JSON-RPC thread/inject_items

Timing depends on the situation; lets running tools finish; hidden from you.

Active turn: queued as pending input and applied at the next model boundary. It does not trigger instant-interrupt preemption, which watches only user input.

Idle: written straight into history; no turn starts.

Sources

Codex CLI, terminal
Codex CLI, App Server API