tech

January 23, 2026

Unrolling the Codex agent loop

Codex CLI⁠(opens in a new window) is our cross-platform local software agent, designed to produce high-quality, reliable software changes while operating safely and efficiently on your machine. We’ve learned a tremendous amount about how to build a world-class software agent since we first launched the CLI in April⁠. To unpack those insights, 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. (For an even more granular view on how the Codex CLI is built, check out our open source repository at https://github.com/openai/codex⁠(opens in a new window). Many of the finer details of our design decisions are memorialized in GitHub issues and pull requests if you’d like to learn more.)

Unrolling the Codex agent loop

TL;DR

  • Codex CLI is a cross-platform local software agent.
  • It is designed to produce high-quality, reliable software changes.
  • It operates safely and efficiently on the user's machine.
  • This post is the first in a series discussing Codex's workings and lessons learned.
  • The open-source repository is available on GitHub for detailed insights.