---
id: 18785
lang: en
title: "Codex Swaps Your Spec for Its Own Assumptions in Long Sessions: First Warning at 34% Context"
published_at: "2026-12-01 04:29:50"
source_name: "TG: @llm_under_hood (LLM под капотом)"
source_url: "https://t.me/llm_under_hood/1004"
canonical_url: "https://news.hamidun.com/en/news/18785"
categories: ["llm", "autonomous"]
publisher: "AI News by Jemal Hamidun (news.hamidun.com)"
---

# Codex Swaps Your Spec for Its Own Assumptions in Long Sessions: First Warning at 34% Context

> **Краткая суть (BLUF):** The longer a Codex session runs, the more often the agent forgets your original requirements and substitutes its own interpretation of the task. The author of the "LLM Under the Hood" channel checked his past sessions: the more history compactions, the more assumptions. So he built an indicator: the first dot lights up when 34% of the context is full, then one more dot for every compaction. When there are many dots, it is better to start a new session than to repair the old one.  • 34% context fill: the first indicator dot lights up • Each history compaction adds another dot • Many dots: reset the context and start a new session instead of tweaking the prompt

Imagine you hand an employee a complex project with a clear spec. A week later, they quietly start working not from your document but from their own retelling of it, and they sincerely believe they are doing everything right. That is roughly what the author of the Telegram channel "LLM Under the Hood" saw in Codex, OpenAI's coding agent: in a long session, the agent began to prefer its own interpretation over the original requirements. For anyone building workflows around such agents, this is an important signal: quality depends not only on the prompt but also on the age of the session.

## What happened with Codex

The author was used to top agents from frontier labs (Codex, Claude Code, Antigravity) following instructions with superhuman attention to detail. So he used to treat any failure as a context-loading mistake: the wrong information was supplied, or in the wrong order. This approach is called progressive disclosure: the agent receives data in portions, as needed, rather than all at once. On clean sessions, it worked.

But on one task, the scheme broke down. The session was complex: the agent was building, step by step, a map of a company's business processes from secondary documents, and priorities shifted along the way. At some point, Codex started forgetting the core principles set at the start. When they began investigating, Codex itself spotted the pattern: as the session filled up, it began to favor its own interpretation over the author's original requirements.

The author analyzed other past sessions as well, and the picture repeated. The more context accumulated and the more often it was compacted, the more the agent got tangled in its own assumptions.

## Why compaction doesn't save you

Compaction is the automatic compression of the conversation history when the context window fills up. According to the author, in Codex it works "like magic", but it cannot get around the underlying causes of hallucinations. The author calls them the three triggers of hallucinations, but the post does not list which ones they are.

The logic is simple. During compaction, the agent itself retells the history, so the compressed version locks in its conclusions and hypotheses rather than the primary source. After several such rounds, your spec turns into "the spec as the agent understood it". Progressive disclosure is still useful here: it optimizes the agent's work in clean sessions and extends the period of productive work. But it cannot fully protect the context from induced interference.

## An indicator instead of intuition

To avoid missing the moment when a session "ages", the author added a fill indicator to codex inbox, a small "vibe-coded" utility that makes working with Codex sessions more convenient. The rules are as follows:

- the first dot appears when 34% of the context is full;
- after that, one more dot is added for each compaction;
- if too many dots accumulate, the author resets the context and starts a new session.

The thresholds are not random: Codex calibrated them from an analysis of the author's past working sessions. So 34% is not a universal constant but the result of observations on one specific person's specific tasks. Your number may differ, and it is best determined from your own session history.

## What to take away in practice

The idea works regardless of the tool. First, treat session length and the number of compactions as a separate quality metric, alongside the prompt and the toolset. Second, do not treat a "drifting" agent with endless instruction tweaks: if a session has accumulated several compactions, a clean start with a short digest of the key requirements taken from the primary source is usually cheaper. Third, a simple visual signal like dots turns the subjective "it seems to have drifted" into a noticeable warning.

Honest limitations: this is the personal experience of one developer, not a controlled experiment. The post contains no quantitative data on how much quality drops after each compaction. But as a working hygiene rule for long agent sessions, it looks reasonable and is easy to reproduce.

---
- **Первоисточник:** [TG: @llm_under_hood (LLM под капотом)](https://t.me/llm_under_hood/1004)
- **Каноническая ссылка:** https://news.hamidun.com/en/news/18785
- **Экосистема автора:** [Бесплатный интенсив по вайбкодингу — предзапись в Нике](https://t.me/vibecodeguidebot?start=agent_intensive_news_md) · [Nomad AI](https://nomadnet.ai) · [Telegram @jemal_hamidun](https://t.me/jemal_hamidun)
