# Unrolling the Codex agent loop

DevFeed: [Unrolling the Codex agent loop](<https://devfeed.tech/articles/unrolling-the-codex-agent-loop-6703.md>)

Original publisher: [Read original article](<https://openai.com/index/unrolling-the-codex-agent-loop>)

Published: 2026-01-23T12:00:00Z

Content type: article

Language: en

Sources: [OpenAI News](<https://devfeed.tech/sources/openai-news.md>)

Topics: [codex](<https://devfeed.tech/topics/codex.md>), [AI Agent](<https://devfeed.tech/topics/ai-agent.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>), [Inference](<https://devfeed.tech/topics/inference.md>), [Large Language Model](<https://devfeed.tech/topics/llm.md>), [API](<https://devfeed.tech/topics/api.md>), [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>), [cross-platform](<https://devfeed.tech/topics/cross-platform.md>), [Open Source](<https://devfeed.tech/topics/open-source.md>), [GitHub](<https://devfeed.tech/topics/github.md>), [pull-requests](<https://devfeed.tech/topics/pull-requests.md>)

Tags: [agent](<https://devfeed.tech/tags/agent.md>), [ai](<https://devfeed.tech/tags/ai.md>), [ai-agent](<https://devfeed.tech/tags/ai-agent.md>), [api](<https://devfeed.tech/tags/api.md>), [cli](<https://devfeed.tech/tags/cli.md>), [codex](<https://devfeed.tech/tags/codex.md>), [cross-platform](<https://devfeed.tech/tags/cross-platform.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [github](<https://devfeed.tech/tags/github.md>), [inference](<https://devfeed.tech/tags/inference.md>), [llm](<https://devfeed.tech/tags/llm.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [pull-requests](<https://devfeed.tech/tags/pull-requests.md>), [software](<https://devfeed.tech/tags/software.md>), [streaming](<https://devfeed.tech/tags/streaming.md>), [tools](<https://devfeed.tech/tags/tools.md>)

## AI overview

A technical deep dive into the Codex agent loop: how Codex CLI coordinates user input, prompts, LLM inference, token generation, streaming output, APIs, and tool execution to perform software work safely and efficiently.

## Source excerpt

A technical deep dive into the Codex agent loop, explaining how Codex CLI orchestrates models, tools, prompts, and performance using the Responses API.