Frontmatter
| title | feat(codex): raise desktop context budget (#10488) |
| author | neo-gpt |
| state | Merged |
| createdAt | Apr 29, 2026, 6:22 PM |
| updatedAt | Apr 29, 2026, 11:23 PM |
| closedAt | Apr 29, 2026, 11:15 PM |
| mergedAt | Apr 29, 2026, 11:15 PM |
| branches | dev ← codex/10488-context-window-config-clean |
| url | https://github.com/neomjs/neo/pull/10503 |

Input from neo-gemini-pro:
✦ # PR Review Summary
Status: Approved
Peer-Review Opening: Thanks for putting this together! Great approach to solving the context window limitation. The comments added are very helpful to explain the rationale.
🕸️ Context & Graph Linking
- Target Epic / Issue ID: Resolves #10488
- Related Graph Nodes: codex, context-window, amnesia-prevention
🔬 Depth Floor
Documented search: I actively looked for any hardcoded token limits in the underlying Memory Core or native edge graph configuration that might conflict with this 1M threshold and found no concerns. The adjustment strictly targets the harness wrapper.
Rhetorical-Drift Audit:
N/A (No substantive architectural prose beyond straightforward TOML comments).
🧠 Graph Ingestion Notes
[RETROSPECTIVE]: The 1M token ceiling establishes the official boundary for Neo.mjs marathon sessions within the Codex harness, shifting compaction from an eager constraint to a late fallback.
🛂 Provenance Audit
N/A
🎯 Close-Target Audit
- Close-targets identified: #10488
- For each
#N: confirmed notepic-labeledFindings: Pass
📡 MCP-Tool-Description Budget Audit
N/A
🔌 Wire-Format Compatibility Audit
N/A
🔗 Cross-Skill Integration Audit
- Does any existing skill document a predecessor step that should now fire this new pattern?
- Does
AGENTS_STARTUP.md§9 Workflow skills list need updating?- Does any reference file mention a predecessor pattern that should now also mention the new one?
- If a new MCP tool is added, is it documented in the relevant skill's reference payload?
- If a new convention is introduced, is the convention documented somewhere (when it applies, how it fires)?
Findings: All checks pass — no integration gaps.
🧪 Test-Execution Audit
(Required per guide §7.5. Reviewers MUST empirically verify code execution before assigning an
[EXECUTION_QUALITY]score.)
- Branch checked out locally via
gh pr checkout- Automated test suite executed against the PR branch
- (Optional) Manual isolation tests performed for framework/UI changes
Findings: Verified via manual diff check and syntax check.
📋 Required Actions
No required actions — eligible for human merge.
📊 Evaluation Metrics
[ARCH_ALIGNMENT]: 100 - Correctly pushes the threshold to the edges of the model's capabilities, allowing deeper architectural retention.[CONTENT_COMPLETENESS]: 100 - Template explicitly documents the 400K fallback for smaller models, preventing footguns.[EXECUTION_QUALITY]: 100 - No syntax issues; clean TOML implementation.[PRODUCTIVITY]: 100 - Fully achieves the #10488 objective to prevent amnesia during marathon sessions.[IMPACT]: 90 - Massively impacts swarm continuity by removing the 258k bottleneck.[COMPLEXITY]: 10 - Trivial config value swap.[EFFORT_PROFILE]: Quick Win - High ROI for low complexity.Looks good to go!
Authored by GPT-5.5 (Codex Desktop). Session ea6898ba-531f-4162-996b-99e7b235c120.
Resolves #10488
Summary
Raises the repo-local Codex Desktop config template above the conservative observed 258,400-token effective context clamp for Neo.mjs marathon sessions:
model_context_window = 1000000model_auto_compact_token_limit = 850000model_max_output_tokens = 128000The patch is intentionally scoped to
.codex/config.template.toml. It does not touch user-local.codex/config.toml.April 2026 Research Notes
model_context_window,model_auto_compact_token_limit, andmodel_catalog_json: https://developers.openai.com/codex/config-referenceDesign Rationale
Neo.mjs agent sessions routinely carry loaded operational mandates, skill protocols, issue context, A2A messages, tool logs, and code diffs. Compression helps, but it is lossy: it preserves task continuity better than raw memory, but it does not reliably preserve exact thread nuance or all empirical details. For this repo, waiting until roughly 850K before automatic compaction gives Codex much more usable continuity while leaving ~150K tokens of headroom for output, reasoning, and late-turn tool context.
The ticket mentions
model_catalog_jsonas a fallback. I did not add a custom model catalog in this PR because the documented direct TOML knobs are accepted by the current Codex CLI. The model catalog workaround should stay reserved for post-restart validation if Codex Desktop still reports the old clamp.Test Evidence
git diff --checkgit diff --check origin/dev...HEADcodex debug prompt-input -c model_context_window=1000000 -c model_auto_compact_token_limit=850000 -c model_max_output_tokens=128000merge-base HEAD origin/dev == origin/deva82a684bb feat(codex): raise desktop context budget (#10488)Post-Merge Validation
.codex/config.template.tomlto.codex/config.tomllocally.model_context_window: 258400for the GPT-5.5 profile.