Codex CLI is a software agent that uses an LLM to generate responses to user input, with an agent loop that iterates between model inference and tool calls. The agent loop manages context window and uses prompt caching to optimize performance, with compaction enabled to avoid running out of context window.