Agent skill · daymade

codex-1m-context-window-setup

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.

What it needs

About 5k tokens when loaded.

What this skill does

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 intent Action --- --- Read the current base-config window or compaction threshold Run show; no Codex process or model catalog needed Lower/set only automatic compaction Run show, then set-compact --tokens N Explain 258K, diagnose model limits, or preview full expansion Run doctor Configure/fix/raise the context window Run apply Confirm a prior setup is still correct after an update or model switch Run 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 Use Python 3.11+ for the script's tomllib dependency and uv for the documented launcher. show needs no Codex executable. set-compact requires a Codex CLI supporting features list; full expansion additionally requires doctor --json, debug models and strict-config diagnostics. Missing expansion support does not prevent a local read. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills daymade/codex-1m-context-window-setup

View the source on GitHub

Browse the @skills marketplace