AI Reset Alert

GuidesUpdated

ChatGPT can't load config.toml: elastic section minimums must sum to DEFAULT_MAX_INPUT_TOKENS (128000), got 126000 — how to fix

This is a validation error caused by the Codex desktop app missing 2000 tokens when it injects the Guardian v2 elastic budget; resetting or reinstalling usually doesn't help. Append the [features.guardianv2.sync_elastic_sections.transcript_selected_exec_results] config block to the end of your local config.toml (on macOS/Linux, ~/.codex/config.toml; on Windows, %USERPROFILE%\.codex\config.toml) and fully restart the desktop app to recover.

How to fix (4 steps to recover)

The full error usually looks like this (some logs also include failed to load configuration):

ChatGPT 无法加载 config.toml,因此无法继续当前聊天。
请修复 config.toml 中的问题:elastic section minimums must sum to DEFAULT_MAX_INPUT_TOKENS (128000), got 126000。保存文件后,请重新打开当前聊天。

When the desktop app starts, it recursively merges the client-injected configuration with the local config.toml, so adding the missing section to the local file is enough to pass validation; you don't need to reset the configuration or reinstall the client.

  1. Completely quit the Codex desktop app. On Windows, right-click the system tray icon and exit; on macOS, press Cmd + Q to fully quit, so background processes don't keep using the old configuration.
  2. Find and back up config.toml. Keep all existing content in the file, and make a copy as a backup first:
    • macOS / Linux: ~/.codex/config.toml
    • Windows: Enter %USERPROFILE%\.codex\config.toml in File Explorer's address bar
    • Custom path: If the CODEX_HOME environment variable is set, edit $CODEX_HOME/config.toml instead. Note that the filename is config.toml; do not create or accidentally rename it to config.json.
  3. Append the following config block to the end of the file:
    [features.guardianv2.sync_elastic_sections.transcript_selected_exec_results]
    min_total_section_tokens = 2000
    max_section_entry_tokens = 2000
    nested_tool_names = ["exec_command"]
    • Do not clear or overwrite the existing contents of config.toml; just append it to the end.
    • If the file already contains a [features.guardianv2.sync_elastic_sections.transcript_selected_exec_results] block with the same name, edit the existing block directly; do not add a duplicate.
    • If you previously wrote a boolean such as guardianv2 = true or guardianv2 = false manually, TOML does not allow the same path to be both a boolean and a table header; clean it up or merge it into the table structure first.
    • If you use SSH remote chat, you also need to separately back up ~/.codex/config.toml on the corresponding remote host and append the same block.
  4. Reopen the Codex desktop app. Open the existing chat or create a new local task again; if the red error message is gone, it has recovered.

Why this error appears

The problem is not in your own configuration; it's a budget configuration mismatch when the Codex desktop version (such as 26.1120.50957 / 26.1120.6357.0, with embedded codex-cli 0.171.0-alpha.13.2) starts up ↗:

ItemDetails
Validation ruleThe underlying ElasticBudgetConfig::validate() requires the sum of the minimum tokens for each section under features.guardianv2.sync_elastic_sections to exactly equal DEFAULT_MAX_INPUT_TOKENS (128000)
Actual shortfallThe elastic budget injected when the desktop app starts app-server sums to only 126000 across sections, missing the 2000 tokens for transcript_selected_exec_results
Why reinstalling doesn't helpThe error occurs in matching the client-injected configuration with the embedded CLI; even if you clear the local config.toml or reinstall the same client version, the injected value is still 126000

The 4 lines of configuration appended above only fill in the 2000-token budget reserved for exec_command tool results during Guardian's automatic safety review, bringing the total back into alignment with 128000; they do not disable Guardian or bypass security checks.

FAQ

After changing the config and opening the desktop app, I get a JavaScript error / Connection for host ID local not found?

This is usually not caused by adding these 4 lines to config.toml; it's more likely an abnormal state of the desktop app's installer package or old processes that haven't fully exited. First check the system tray or Activity Monitor for any remaining Codex processes and end them all, then verify that config.toml has no TOML syntax errors (for example, missing quotes, duplicate table headers, or a conflict with guardianv2 = true); if the desktop app still cannot start the local host process, reinstall the desktop app package or use the standalone CLI first.