<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/what-codex-actually-sends-to-the-model-zq5oukcmw" -->

---
title: What Codex Actually Sends to the Model | daily.dev
description: A detailed empirical investigation into what OpenAI&#x27;s Codex CLI actually sends to the model on each request. Starting from a 16-character prompt that ballooned...
canonical: https://daily.dev/posts/what-codex-actually-sends-to-the-model-zq5oukcmw
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: What Codex Actually Sends to the Model | daily.dev
og:description: A detailed empirical investigation into what OpenAI&#x27;s Codex CLI actually sends to the model on each request. Starting from a 16-character prompt that ballooned...
og:url: https://daily.dev/posts/what-codex-actually-sends-to-the-model-zq5oukcmw
og:image: https://api.daily.dev/og/posts/Zq5oUkCmw.png
og:image:alt: What Codex Actually Sends to the Model
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# What Codex Actually Sends to the Model

**[0xkato](https://daily.dev/sources/0xkato)** · 9 min read · 0 upvotes · 0 comments

## Summary

A detailed empirical investigation into what OpenAI's Codex CLI actually sends to the model on each request. Starting from a 16-character prompt that ballooned to 42,980 bytes, the author intercepted HTTP requests using a local recorder and measured how token counts grew as Codex loaded system instructions, tool definitions, AGENTS.md project instructions, skill metadata, file contents, command output, images, and MCP tool descriptions. Key findings: the user prompt accounts for only 0.3% of the initial request; tool definitions and base instructions dominate; file contents and terminal output accumulate in history without deduplication; images are transmitted as base64 data URLs; MCP tool descriptions are deferred until discovery; and compaction replaces accumulated history with a model-generated summary, shrinking subsequent requests significantly.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://0xkato.xyz/what-codex-actually-sends-to-the-model>

## Similar posts on daily.dev

- [OpenAI Begins Article Series on Codex CLI Internals](https://daily.dev/posts/openai-begins-article-series-on-codex-cli-internals-dwhoatisz) · InfoQ · 1 upvotes · 0 comments
- [How OpenAI Codex Works](https://daily.dev/posts/how-openai-codex-works-ianegzsz8) · ByteByteGo · 5 upvotes · 0 comments

---

Tags: [#nlp](https://daily.dev/tags/nlp), [#ai-coding](https://daily.dev/tags/ai-coding), [#mcp](https://daily.dev/tags/mcp), [#openai-codex](https://daily.dev/tags/openai-codex)

[View this post on daily.dev](https://daily.dev/posts/what-codex-actually-sends-to-the-model-zq5oukcmw)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"What Codex Actually Sends to the Model","url":"https://daily.dev/posts/what-codex-actually-sends-to-the-model-zq5oukcmw","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/what-codex-actually-sends-to-the-model-zq5oukcmw"},"datePublished":"2026-08-04T12:39:55.570Z","dateModified":"2026-08-04T12:40:52.950Z","description":"A detailed empirical investigation into what OpenAI's Codex CLI actually sends to the model on each request. Starting from a 16-character prompt that ballooned...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/a666c96194b54d93b94608740d4bb6dc?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/a666c96194b54d93b94608740d4bb6dc?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"0xkato","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"0xkato","logo":"https://media.daily.dev/image/upload/s--4y20wV9B--/f_auto,q_auto/v1785654409/logos/0xkato","url":"https://daily.dev/sources/0xkato"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/what-codex-actually-sends-to-the-model-zq5oukcmw","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"nlp,ai-coding,mcp,openai-codex","timeRequired":"PT9M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"0xkato","item":"https://daily.dev/sources/0xkato"},{"@type":"ListItem","position":3,"name":"What Codex Actually Sends to the Model"}]}
```

