Skip to main content
  1. Short Thoughts/

Unrolling the Codex agent loop

·1 min

Michael Bolin provides a detailed explainer Unrolling the Codex agent loop | OpenAI on the OpenAI blog.

this is the first post in an ongoing series where we’ll explore various aspects of how Codex works, as well as hard-earned lessons. […] To kick off, we’ll focus on the agent loop, which is the core logic in Codex CLI that is responsible for orchestrating the interaction between the user, the model, and the tools the model invokes to perform meaningful software work. We hope this post gives you a good view into the role our agent (or “harness”) plays in making use of an LLM.

There are detailed graphics that help visualize the loop and technical details about context management.

This post is required reading for any engineer using coding agents as it explains the core loop of all agents.

— via The Pragmatic Engineer