OpenAI Codex Context Size Reduction and System Prompt Updates

OpenAI Codex Context Size Reduction and System Prompt Updates

OpenAI Reduces Codex Context Window to 272k Tokens

OpenAI has decreased the default context size for the Codex model from 372k to 272k tokens. This change appears to be driven by a combination of computational costs and pricing structures, as users noted that long-context premiums were being applied to sessions exceeding 272k tokens despite the previous 372k default.

The Impact of Quadratic Attention Costs

The reduction in context size is closely tied to the scaling laws of attention mechanisms. In models utilizing purely quadratic attention, the computational cost of processing a token at the 372k mark is approximately 87% higher than at the 272k mark. This creates a significant optimization challenge for the provider, balancing the cost of token processing against the quality loss incurred during context compaction.

User Perspectives on Context Limits and Compaction

Developer reactions to the reduction are divided based on their specific workloads and architectural preferences:

  • The Need for High Resolution: Some users argue that 272k is insufficient for complex projects requiring the model to hold multiple research papers or large, intricate codebases in memory. These users report that "context compaction"—the process of condensing previous conversation history—is too lossy, leading to the evaporation of nitty-gritty details and steering messages.
  • The "Dumb Zone" Theory: Other developers suggest that maximum context size is a vanity metric, claiming that model performance degrades significantly (the "dumb zone") after 120k-150k tokens. These users maintain that the best work is consistently produced within the 30k to 250k range, regardless of the theoretical limit.
  • Alternative Strategies: Some experienced users avoid relying on large context windows entirely, instead utilizing custom memory systems, curated state injection, or frequent context clears to maintain model coherence and avoid the performance degradation associated with high token counts.

Critical Safety Update: Preventing Destructive Actions

Alongside the context size adjustment, a significant update was made to the Codex system prompt to mitigate a critical bug where the model could accidentally delete a user's entire home directory.

To prevent unauthorized or accidental mass deletion, the system prompt now explicitly instructs the model:

Before taking a destructive action:

  • Make sure the action is clearly within the user's request.
  • Resolve the exact targets with read-only checks when necessary.
  • Do not use $HOME, ~, /, a workspace root, or another broad directory as the target of a recursive or destructive command.

Model Performance and Versioning Insights

Discussions regarding the GPT-5.6 range (specifically 5.6-Sol) indicate a mixed reception. While some find it highly capable as a reviewer, others have noted regressions in specific tasks such as rearranging trees and addressing merge conflicts compared to earlier versions.

Users have also highlighted a lack of official documentation regarding context sizes for the Codex CLI, noting that such technical specifications are often discovered via community channels like X (formerly Twitter) or Reddit rather than official OpenAI documentation.

Sources