Repository navigation
Description
What happens
Ferry, a real Codex session (owner, 2026-10-08). A person steers a message into a running codex turn. Codex takes a steer only when its current step ends, so the steer waits in SessionView.pendingInputs, which Ferry shows above the composer as "Waiting for Codex to read". The person then stops the turn. The turn ends aborted and the session goes idle. The steer stays in pendingInputs for as long as the process lives. Codex never reads it, no record says it was dropped, and later turns don't read it either. A host following docs/design/chat-ui.md ("a tray above the composer until the runtime takes the input") shows "waiting" forever, with nothing it can do.
Why: codex drops it, and says nothing
From openai/codex at ea27864 (main, 2026-10-08):
turn/interrupt→Session::abort_all_tasks(tasks/mod.rs#L549-L576) first takes the active turn out of the session (take_active_turn, #L893-L905). It then callsinput_queue.clear_pending(&active_turn), which clearspending_input.items(session/input_queue.rs#L315-L320).finish_turn_abortdoes the same (#L624).on_task_finishedis the path that would record the turn's pending input as auserMessageitem (the echo oar maps touser_message; #L662-L697 →record_pending_input). After an interrupt it finds no active turn and returns early. So byturn/completed, a steer has either been echoed or dropped: echoed when the turn ends by itself, dropped when it was interrupted.- Codex's own TUI relies on this (tui/src/chatwidget/input_restore.rs#L340-L342): "The server has already discarded pending input by the time the interrupted turn reaches the UI, so any unacknowledged steers still tracked here must be restored locally instead of waiting for a later commit." On Esc it puts them back in the composer, or resubmits them when the interrupt was made to send them.
oar's codex adapter maps turn/completed {status: "interrupted"} to turn_ended {aborted} and nothing else. The view rule in docs/spec/conversation.md, "An input never echoed stays pending, even after its turn ends", then keeps the steer pending. That rule fits an input the runtime still holds (claude: "Input arriving after the last step becomes a subsequent turn"). It does not fit one the runtime has thrown away.
Repro (oar 0.39.0; observe/ and the codex projection are unchanged on main 97170d4)
These are the records the codex adapter writes for this case:
import { createSessionKernel } from "@botiverse/oar/kernel";
import { viewOf } from "@botiverse/oar/observe";
const k = createSessionKernel("thread-1");
const at = { spanId: "turn-1" };
await k.control({ kind: "prompt", input: "run the slow check", inputId: "in-1" },
() => ({ kind: "accepted", native: { turn: { id: "turn-1" } } }));
k.frame({ type: "item/started", native: {}, events: [
{ kind: "user_message", input: "run the slow check", inputId: "in-1", evidence: "turn_item" }] }, at);
k.frame({ type: "item/started", native: {}, events: [
{ kind: "tool_call_started", callId: "cmd-1", tool: "commandExecution" }] }, at);
// turn/steer while the command runs: codex holds it until the step ends.
await k.control({ kind: "steer", input: "also check the tests", inputId: "in-2" },
() => ({ kind: "accepted", native: { turnId: "turn-1" } }));
// turn/interrupt, then turn/completed {status: "interrupted"}: codex has dropped the steer.
await k.control({ kind: "abort" }, () => ({ kind: "accepted", native: {} }));
k.frame({ type: "turn/completed", native: {}, events: [
{ kind: "turn_ended", outcome: { kind: "aborted" } }] }, at);
const view = viewOf(k.records());
console.log(view.status.kind, view.messages.at(-1)?.outcome);
console.log(view.pendingInputs.map((input) => [input.input, input.state]));idle { kind: 'aborted' }
[ [ 'also check the tests', 'accepted' ] ]
To see it live: prompt codex with something that runs one long command (sleep 60), steer() while the command runs, then abort(). The turn/completed arrives with no userMessage item for the steer's clientUserMessageId.
Expected
The adapter records what codex did, the same inference codex's own client makes: on a root turn/completed with status interrupted, every steer accepted for that turn (its expectedTurnId) that hasn't been echoed was dropped. One possible shape (yours to choose):
- an event on that frame, e.g.
input_dropped { inputId, reason: "turn_interrupted" }, which the conversation reducer folds asConversationInput.state: "dropped"; - in the view, a dropped input leaves
pendingInputsand entersmessageswhere it was dropped (the end of that turn), the way a refused input enters where it was refused.
A host can then show it as "not read" and offer to send it again, which is what codex's TUI does. Ferry will show it in the transcript with Resend, as it already does for an input the runtime refused. Ferry won't send it again by itself: a person's stop pauses Ferry's queue.
Worth checking in the same pass:
- claude: the interrupt's
control_responsecarriesstill_queued(docs/runtimes/claude.md). We haven't verified whether a steer written to stdin survives an interrupt (and runs as a spontaneous turn) or is cancelled (interrupt_cancel_queued_v1). If it is cancelled, claude has the same gap. - exit: an input still pending when the process exits is gone too. Ferry already shows an ended run's
pendingInputsas "Not read by the agent". A view-level rule ("an exit drops what's pending") would give every host the same.
Ferry side
Ferry's mock runtime now drops an unread steer on abort, as codex does. Its integration test "doesn't keep a steer waiting for an agent that stopped its turn without reading it" is it.fails until this ships. Ferry will adopt the new state then (decision D088).
Activity
xxchan commentedon Oct 8, 2026
Decided by @cindy: yes. The drop is recorded as a runtime fact by the adapter. The view never infers it from a turn end.
The current rule ("an input never echoed stays pending, even after its turn ends") stays as written for runtimes that keep the input. What changes is that an adapter which knows its runtime discarded an input now says so on the frame that proves it. This is the same inference codex's own client makes (
input_restore.rs), and it rests on the same source.Contract
input_dropped { inputId, reason: "turn_interrupted" }, added toRuntimeEventBody. An adapter emits it only where the runtime's own behavior (source or a recorded probe) shows the input was discarded. The runtime page cites that evidence.turn/completedwith statusinterrupted, emit oneinput_droppedfor every steer accepted for that turn (itsexpectedTurnId) that has nouserMessageecho. Emit it on that frame, ahead ofturn_ended.ConversationInput.stategains"dropped", carrying its reason.pendingInputsand entersmessageswhere it was dropped, the same way a rejected input enters where it was refused.exitedrecord. It falls under liveness.md's "death settles what was waiting":droppedwithreason: "runtime_exited". This covers inputs the adapter still held and accepted inputs never echoed.runtime_exitedmeans "not seen read before the process ended". A runtime that took the input just before dying, without its echo reaching stdout, could still have it in a resumed transcript.Same pass, audit each runtime with
steer. For each, check what happens to an accepted, unread steer on abort, using real CLIs and SDKs against the scripted provider. No real accounts.control_responsestill_queuedand claude'scancel_queuedmarkers (unmapped today) say. If claude cancels the input, map that marker toinput_dropped. If it keeps the input and runs it as a spontaneous turn, nothing changes.abort()does to its steering queue.Tests:
dropped, the view'spendingInputsis empty, the message sits at the turn end);turn/completedwith one echoed and one unechoed steer drops only the unechoed one;feat: surface discarded steering inputs (#241)
chore: release v0.43.0 (#243)