r/ChatGPTPro • • 4d ago

Question & Advice ChatGPT error

I'm getting the following error in every Codex chat, including brand-new conversations:

elastic section minimums must sum to DEFAULT_MAX_INPUT_TOKENS (128000), got 126000

I'm on Windows, using Codex version 26.1120.6357.0. This started happening randomly, and I can't use Codex at all anymore.

I've tried renaming and clearing config.toml, checking for updates, restarting my computer, repairing the app through Windows settings, and using the standalone Codex CLI. I also checked my entire config.toml, and there are no token allocation settings in it.

I even renamed the entire .codex folder to force Codex to create a completely fresh environment. This didn't fix anything and temporarily removed my entire conversation history. Thankfully, I recovered my conversations by restoring the original folder.

Nothing has worked so far. I've seen other people reporting the exact same error, so I'm assuming it might be an internal Codex bug or a server-side configuration issue.

Has anyone found an actual fix or workaround? I don't want to risk losing my conversation history again.

5 Upvotes

19 comments sorted by

•

u/qualityvote2 4d ago edited 3d ago

u/NoNeedleworker5212, there weren’t enough community votes to determine your post’s quality.
It will remain for moderator review or until more votes are cast.

2

u/InterstellarReddit 4d ago

The codex app is also having errors. My conversation is not show up on a connected computer while on the Codex app, and it typically show up for me to resume conversations while on the go

2

u/NoNeedleworker5212 4d ago

It is on codex for me too.

0

u/NoNeedleworker5212 4d ago

This fixes it:

$ErrorActionPreference = 'Stop'

$pkg = Get-AppxPackage -Name OpenAI.Codex

if (-not $pkg) { throw 'OpenAI.Codex package not found; nothing changed.' }

$root = [IO.Path]::GetFullPath($pkg.InstallLocation).TrimEnd('\') + '\'

Get-CimInstance Win32_Process |

Where-Object { $_.ExecutablePath -and $_.ExecutablePath.StartsWith($root, [StringComparison]::OrdinalIgnoreCase) } |

ForEach-Object { Stop-Process -Id $_.ProcessId -Force -ErrorAction SilentlyContinue }

$cfg = Join-Path $env:USERPROFILE '.codex\config.toml'

if (-not (Test-Path -LiteralPath $cfg)) { throw "Config not found at $cfg; nothing changed." }

$backup = "$cfg.pre-elastic-$(Get-Date -Format 'yyyyMMdd-HHmmss')"

Copy-Item -LiteralPath $cfg -Destination $backup

$text = [IO.File]::ReadAllText($cfg)

$header = '[features.guardianv2.sync_elastic_sections.transcript_selected_exec_results]'

if ($text -notmatch [regex]::Escape($header)) {

$block = @'

[features.guardianv2.sync_elastic_sections.transcript_selected_exec_results]

min_total_section_tokens = 2000

max_section_entry_tokens = 2000

nested_tool_names = ["exec_command"]

'@

[IO.File]::AppendAllText($cfg, $block, [Text.UTF8Encoding]::new($false))

Write-Host 'Added the workaround stanza.'

} else {

Write-Host 'That stanza already exists; did not add a duplicate.'

}

$appId = (Get-AppxPackageManifest -Package $pkg.PackageFullName).Package.Applications.Application |

Select-Object -First 1 -ExpandProperty Id

Start-Process explorer.exe -ArgumentList "shell:AppsFolder\$($pkg.PackageFamilyName)!$appId"

Write-Host "Config backup: $backup"

2

u/AdZestyclose1135 4d ago

I'm getting this error too on any conversations that are not synced to the cloud and exist only in the work side of the desktop app

2

u/NoNeedleworker5212 4d ago

Yes same I would hate to lose all my projects and context.

1

u/NoNeedleworker5212 4d ago

This fixes it:

$ErrorActionPreference = 'Stop'

$pkg = Get-AppxPackage -Name OpenAI.Codex

if (-not $pkg) { throw 'OpenAI.Codex package not found; nothing changed.' }

$root = [IO.Path]::GetFullPath($pkg.InstallLocation).TrimEnd('\') + '\'

Get-CimInstance Win32_Process |

Where-Object { $_.ExecutablePath -and $_.ExecutablePath.StartsWith($root, [StringComparison]::OrdinalIgnoreCase) } |

ForEach-Object { Stop-Process -Id $_.ProcessId -Force -ErrorAction SilentlyContinue }

$cfg = Join-Path $env:USERPROFILE '.codex\config.toml'

if (-not (Test-Path -LiteralPath $cfg)) { throw "Config not found at $cfg; nothing changed." }

$backup = "$cfg.pre-elastic-$(Get-Date -Format 'yyyyMMdd-HHmmss')"

Copy-Item -LiteralPath $cfg -Destination $backup

$text = [IO.File]::ReadAllText($cfg)

$header = '[features.guardianv2.sync_elastic_sections.transcript_selected_exec_results]'

if ($text -notmatch [regex]::Escape($header)) {

$block = @'

[features.guardianv2.sync_elastic_sections.transcript_selected_exec_results]

min_total_section_tokens = 2000

max_section_entry_tokens = 2000

nested_tool_names = ["exec_command"]

'@

[IO.File]::AppendAllText($cfg, $block, [Text.UTF8Encoding]::new($false))

Write-Host 'Added the workaround stanza.'

} else {

Write-Host 'That stanza already exists; did not add a duplicate.'

}

$appId = (Get-AppxPackageManifest -Package $pkg.PackageFullName).Package.Applications.Application |

Select-Object -First 1 -ExpandProperty Id

Start-Process explorer.exe -ArgumentList "shell:AppsFolder\$($pkg.PackageFamilyName)!$appId"

Write-Host "Config backup: $backup"

3

u/AdZestyclose1135 4d ago

Looks like they patched it as it's working today without that fix but thx for the heads up!

1

u/AdditionalEstate3250 4d ago

Shoutout health_et_fitness he said this
FIX :

TOTALLY CLOSE THE APP

Windows: at %USERPROFILE%.codexconfig.toml.

MacOS / Linux : at ~/.codex/config.toml.

ADD THIS :

[features.guardianv2.sync_elastic_sections.transcript_selected_exec_results]

min_total_section_tokens = 2000

max_section_entry_tokens = 2000

nested_tool_names = ["exec_command"]

SAVE AND REOPEN CODEX

its not an offcial config but at least until openia fix it

https://www.reddit.com/r/codex/s/GG42RgMV3W

SPREAD THE WORD YALL

2

u/NoNeedleworker5212 4d ago

Thank you so much, this helped and fixed it.

One command to do all that:
$ErrorActionPreference = 'Stop'

$pkg = Get-AppxPackage -Name OpenAI.Codex

if (-not $pkg) { throw 'OpenAI.Codex package not found; nothing changed.' }

$root = [IO.Path]::GetFullPath($pkg.InstallLocation).TrimEnd('\') + '\'

Get-CimInstance Win32_Process |

Where-Object { $_.ExecutablePath -and $_.ExecutablePath.StartsWith($root, [StringComparison]::OrdinalIgnoreCase) } |

ForEach-Object { Stop-Process -Id $_.ProcessId -Force -ErrorAction SilentlyContinue }

$cfg = Join-Path $env:USERPROFILE '.codex\config.toml'

if (-not (Test-Path -LiteralPath $cfg)) { throw "Config not found at $cfg; nothing changed." }

$backup = "$cfg.pre-elastic-$(Get-Date -Format 'yyyyMMdd-HHmmss')"

Copy-Item -LiteralPath $cfg -Destination $backup

$text = [IO.File]::ReadAllText($cfg)

$header = '[features.guardianv2.sync_elastic_sections.transcript_selected_exec_results]'

if ($text -notmatch [regex]::Escape($header)) {

$block = @'

[features.guardianv2.sync_elastic_sections.transcript_selected_exec_results]

min_total_section_tokens = 2000

max_section_entry_tokens = 2000

nested_tool_names = ["exec_command"]

'@

[IO.File]::AppendAllText($cfg, $block, [Text.UTF8Encoding]::new($false))

Write-Host 'Added the workaround stanza.'

} else {

Write-Host 'That stanza already exists; did not add a duplicate.'

}

$appId = (Get-AppxPackageManifest -Package $pkg.PackageFullName).Package.Applications.Application |

Select-Object -First 1 -ExpandProperty Id

Start-Process explorer.exe -ArgumentList "shell:AppsFolder\$($pkg.PackageFamilyName)!$appId"

Write-Host "Config backup: $backup"