A thread you can test
Protocol and Interface
3 notes move from the word to a real choice at work — understand it first, then decide whether to use it.
Each note stands alone, or becomes the next step in this thread.
THE QUESTION THIS PAGE ANSWERS
ANSWER FIRSTWhat is Protocol and Interface, and which AI decisions does it change?
Commands walk the Submission Queue; events walk the Event Queue. Rust calls it TurnStarted; JSON still writes task_started. Where an unknown type lands on each of the three paths This page keeps the related concepts, common mistakes, and practical notes in one reading thread.
First decide whether you are blocked by a definition, a choice, or verification; then choose the closest of the 3 notes below.
Start with “SQ in, EQ out: two faces of the same thing,” then restate the conclusion using your own task.
Do not treat every method in a topic as interchangeable. The answer changes with the input, risk, and acceptance bar.
THIS QUESTION THREAD
Put the word back inside the choice it changes.
SQ in, EQ out: two faces of the same thing
Commands walk the Submission Queue; events walk the Event Queue. Rust calls it TurnStarted; JSON still writes task_started. Where an unknown type lands on each of the three paths
The external protocol is a projection
Codex’s external protocol is a projection: a turn/start first returns a response, then pushes the event stream. Approval is a reverse request. The two official SDKs do not walk the same protocol face
How streaming output finalizes between two terminal regions
Codex splits streaming output into a stable region and a live tail: finalized lines go to the terminal scrollback; an unclosed table stays in the mutable region so column widths do not keep reshuffling