Skills

Codex 1m Context Window Setup

Configures and verifies an expanded, model-aware context window for OpenAI Codex CLI...

Install

npx skills add daymade/claude-code-skills --skill codex-1m-context-window-setup -g -a claude-code -y
Category
Engineering
Updated
3d ago
License
MIT
Context cost
Mediumabout 1,928 tokens
Runs scripts
Yes, review before use

What it does

Configures and verifies an expanded, model-aware context window for OpenAI Codex CLI and Desktop. Use to inspect local context settings, lower or set the auto-compaction threshold, expand ~258K context to 500K or 1M, or repair model_context_window/model_auto_compact_token_limit. Not for changing the selected model or other Codex settings.

Codex 1m Context Window Setup

Inspect local settings or change only automatic compaction. For full context expansion, read Codex's current model catalog, cap the request at the model's declared maximum, and apply the bundled expansion preset.

Route the request

User intentAction
Read the current base-config window or compaction thresholdRun show; no Codex process or model catalog needed
Lower/set only automatic compactionRun show, then set-compact --tokens N
Explain 258K, diagnose model limits, or preview full expansionRun doctor
Configure/fix/raise the context windowRun apply
Confirm a prior setup is still correct after an update or model switchRun verify

Honor a user-specified threshold exactly. If the user only asks for a small reduction, choose and state a modest reversible reduction from the observed value. For expansion, derive attainable values from the live catalog instead of asking the user for model limits. Running apply selects the full expansion preset and replaces a custom threshold; do it only when full setup is requested.

For local reads/edits, start with the bundled commands. Do not dump config.toml, load unrelated machine manuals, or run network/model diagnostics. Consult official OpenAI documentation when parameter semantics or compatibility are unresolved; it cannot establish this machine's current value. Respect host output restrictions; if numeric output is denied, use its supported field-condition probe and keep an unread value unknown. Do not reconstruct denied values through repeated comparisons.

Prerequisites

Read the whole SKILL.md on GitHub

More in Engineering