OpenAI reduces Codex Model Context Size from 372k to 272k
370 points
• 2 days ago
• Article
Link
该 GitHub Pull Request 编号为 33972,记录了 openai/codex 仓库的一项技术更新。此 PR 于 2026 年 7 月 18 日合并,内容是将更新后的捆绑模型元数据向后移植到 0.144 release 分支。
合并由用户 sayan-oai 执行,他将来自功能分支的单个 commit 合并到 release/0.144 分支。此次更改范围很小,仅涉及文件 codex-rs/models-manager/models.json 。
diff 分析显示本次更新共有 118 处变更,其中该 JSON 配置文件内有 64 处添加和 54 处删除。通过向后移植这些更新,团队确保 0.144 release 与最新的捆绑模型元数据保持一致,这对于 Codex 架构中模型的正确管理与配置至关重要。
This GitHub pull request, identified as number 33972, documents a specific technical update within the openai/codex repository. The pull request, which was merged on July 18, 2026, involved a backport of refreshed bundled model metadata into the 0.144 release branch.
The operation was performed by user sayan-oai, who merged a single commit from a feature branch into the release/0.144 branch. The technical scope of the change was narrow, focusing on a single file, codex-rs/models-manager/models.json.
The diff analysis for this update shows a total of 118 changes, comprised of 64 additions and 54 deletions within the designated JSON configuration file. By backporting these updates, the team ensured that the 0.144 release maintained consistency with the most current bundled model metadata, which is critical for the proper management and configuration of models within the Codex architecture.
164 comments • Comments Link
• 当前编程代理中的 Auto-compaction 对高级用户是一个显著痛点:它在 Context 容量仅剩约 10–20% 时就会触发,常引起 hallucinations,并阻碍用户恢复到 pre-compaction 状态。
• 与其依赖海量的 Context windows,不如构建模块化、分层的文档(例如 plan.md 、 reports.md 、 reviews.md)供代理作为外部记忆引用,这通常更为有效。
• 复杂任务应交由专门的 Subagents 团队处理,这能让主 Orchestrator 的 Context window 保持专注,并在总体 Token 成本上优于在内存中保留大块信息。
• 有人认为 Compaction 是为成本和延迟(Latency)做出的必要但令人沮丧的权衡,因为当模型接近最大 Token 限制时,性能本就会下降。
• 专用的 Harnesses 和工具(如 pi 或自定义实现)允许用户禁用 Auto-compaction 、使用手动 Recall triggers,或实施"Context bonsai"策略,从而在不丢失关键数据的前提下选择性地修剪记忆。
• 用 LLMs 优化和重组规则文件,可以通过更简洁、目标明确、模型更容易解析的指令,替代冗长复杂的说明,从而减少 Context bloat 。
• 破坏性的 AI 行为仍是重大风险,促使开发者加入只读检查(Read-only checks)和环境级隔离(Environment-level isolation)等安全层,以防止意外删除敏感目录。
• 关于大型 Context windows 的有效性存在争议;一些用户指出"Dumb zones"常在达到理论容量上限前就出现,使得较小且经良好管理的会话优于冗长、未经整理的会话。
• 开发团队应将开源编码代理视为可定制框架,用户通常可以修改本地参数、快捷键和启发式规则,而不是被 upstream defaults 绑死。
• Token 效率通常取决于项目架构;清晰的接口和合理的文件拆分消除了对无限 Chat window 的需求,无论模型容量如何。
此次讨论突出了对更大 Context windows 的诉求与模型性能下降现实之间的根本矛盾。尽管许多用户主张扩大容量以应对复杂、大型代码库,社区中更大一部分人建议通过严谨的文档、模块化规划和 Subagent 编排来获得更优结果。目前普遍共识是:现有 Auto-compaction 的实现往往具有破坏性且缺乏透明度,因此许多开发者选择构建自定义 Harness 或采用手动的内存管理策略。总的来看,转向更小且高精度的 Context windows,并辅以基于文件的外部记忆,似乎是实现可靠、可持续开发的更有韧性的路径。 • Auto-compaction in current coding agents is a significant pain point for power users, as it triggers at 10-20% context capacity, often causes hallucinations, and prevents users from reverting to pre-compaction states.
• Relying on massive context windows is often less effective than building modular, hierarchical documentation such as `plan.md`, `reports.md`, and `reviews.md` files that the agent can reference as external memory.
• Complex tasks should be handled by teams of specialized subagents, which keeps the primary orchestrator's context window focused and reduces overall token costs compared to keeping a monolith of information in memory.
• Compaction is seen by some as a necessary, albeit frustrating, trade-off for cost and latency, as performance often degrades anyway when models are stretched to their maximum token limits.
• Dedicated harnesses and tools like `pi` or custom implementations allow users to disable auto-compaction, use manual recall triggers, or implement "context bonsai" strategies to selectively prune memory without losing critical data.
• Using LLMs to optimize and restructure rule files can reduce context bloat, replacing verbose, complex instructions with concise, goal-oriented directives that the model can parse more reliably.
• Destructive AI actions remain a significant risk, prompting developers to implement safety layers like read-only checks and environment-level isolation to prevent accidental deletion of sensitive directories.
• The effectiveness of large context windows is debated, with some users noting that "dumb zones" often appear well before reaching theoretical maximums, making smaller, well-managed sessions superior to long, uncurated ones.
• Development teams should treat open-source coding agents as customizable frameworks; users can often modify local parameters, hotkeys, and heuristics rather than accepting upstream defaults.
• Token efficiency is often a function of project architecture, where clear interfaces and logical file decomposition eliminate the need for an infinite chat window, regardless of the model's capacity.
The discussion highlights a fundamental tension between the desire for larger context windows and the practical reality of model performance degradation. While many users advocate for increased capacities to manage complex, monolithic codebases, a significant portion of the community suggests that superior outcomes are achieved through rigorous documentation, modular planning, and subagent orchestration. There is a clear consensus that current auto-compaction implementations are often destructive and lack transparency, leading many developers to build custom harnesses or implement manual memory management strategies. Ultimately, the shift toward smaller, high-precision context windows—supplemented by external file-based memory—appears to be the most resilient approach for reliable, long-term development.