Inside OpenAI Codex

A thread you can test

Governance and Loops

5 notes move from the word to a real choice at work — understand it first, then decide whether to use it.

READING THREADOPEN
5notes
HOW TO READStart where you are stuck, then follow the evidence and trade-offs

Each note stands alone, or becomes the next step in this thread.

Inside OpenAI CodexNo login

THE QUESTION THIS PAGE ANSWERS

ANSWER FIRST

What is Governance and Loops, and which AI decisions does it change?

Begin a source-led exploration of context, turns, tools, approvals, and sandboxing. The goal is to see how a coding agent earns trust through explicit boundaries rather than through a friendly interface. This page keeps the related concepts, common mistakes, and practical notes in one reading thread.

DECISION RULE

First decide whether you are blocked by a definition, a choice, or verification; then choose the closest of the 5 notes below.

TRY NEXT

Start with “Read a coding agent as a system of boundaries,” then restate the conclusion using your own task.

WATCH FOR

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.

5 notes
Engineering

Read a coding agent as a system of boundaries

Begin a source-led exploration of context, turns, tools, approvals, and sandboxing. The goal is to see how a coding agent earns trust through explicit boundaries rather than through a friendly interface.

Inside OpenAI Codex 11 min →
Architecture

Three-layer Turn Loop: who gets to say continue

Codex splits one conversation into a task shell, a turn, and sampling: each layer answers only its own question, and control sits in one layer at a time.

Inside OpenAI Codex 10 min →
Architecture

The stream is still going. Tools already started.

The model is still streaming words, and a tool call is already recognized. Codex writes history on OutputItemDone, then pins exec — every stream exit drains first.

Inside OpenAI Codex 9 min →
Architecture

Mid-turn interrupt: this turn, next turn, or refused

The Agent is editing a file when you add a constraint. Codex uses one entry, three modes, and a two-stage mailbox to decide start, steer, or refuse on the spot.

Inside OpenAI Codex 10 min →
Architecture

After You Hit Cancel, How Each Layer Stands Down

Tool failures go back to the model; only Esc stops the turn. A cancel token travels from the task to sampling to tools, finished results stay in history, and a hard abort after 100 ms cannot be undone

Inside OpenAI Codex 11 min →