codex - 💡(How to fix) Fix Config migration needed: legacy profile config and model pinning broke after update

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

  • If legacy profile config is detected, warn + continue with safe defaults instead of hard fail.
  1. Observe startup/config error:
  2. If migration cannot be completed, Codex should warn but still start with safe defaults (not hard-fail startup/config refresh).
RAW_BUFFERClick to expand / collapse

What version of the IDE extension are you using?

1.122.1

What subscription do you have?

ChatGPT Team

Which IDE are you using?

VS Code

What platform is your computer?

Microsoft Windows NT 10.0.19045.0 x64

What issue are you seeing?

After updating Codex (observed on May 31, 2026), my previously working VS Code setup broke due to config contract changes.

Two regressions caused immediate disruption:

  1. Legacy profile config no longer accepted
  • Existing profile = "safe-auto" in ~/.codex/config.toml started failing with:
    • legacy profile ... no longer supported; use --profile ... with <name>.config.toml
  • Result: startup/runtime failures and fallback behavior that was hard to diagnose.
  1. Model compatibility mismatch not handled safely
  • Repo/workspace configs using model = "gpt-5-codex" began returning 400 errors when authenticated via ChatGPT account.
  • Result: chat failures in active repos until model pins were manually commented out.

This felt like a breaking change without migration support.

Please consider these improvements:

  • Automatic config migration on first launch after upgrade:

    • Convert legacy profile = "..." and [profiles.*] blocks into <name>.config.toml files.
    • Keep a backup and show a clear migration summary.
  • Backward-compatible fallback behavior:

    • If legacy profile config is detected, warn + continue with safe defaults instead of hard fail.
  • Auth-aware model validation:

    • Before applying model from config, validate against account/auth mode.
    • If unsupported, show actionable warning and fall back to a supported model.
  • Upgrade diagnostics:

    • “Your config was updated” or “X settings were ignored” panel with exact file/line references.
  • Better docs and release notes:

    • Explicit migration guide with before/after examples for profile-v1 to profile-v2.

This would significantly reduce downtime for users who maintain stable shared workspace configs across machines and repos.

What steps can reproduce the bug?

  1. Use VS Code + Codex IDE extension on Windows, authenticated with a ChatGPT account (Team plan in my case).
  2. Have legacy profile-v1 config in ~/.codex/config.toml, specifically:
    • profile = "safe-auto"
    • profile blocks like [profiles.safe-auto], [profiles.python], etc.
  3. Start/open Codex chat in the IDE.
  4. Observe startup/config error:
    • legacy profile ... no longer supported; use --profile <name> with <name>.config.toml
  5. Comment out profile = "safe-auto" and retry.
  6. In workspace/repo .codex/config.toml, keep model = "gpt-5-codex" (as many existing repos had).
  7. Start chat in that workspace/repo.
  8. Observe request failure:
    • 400 invalid_request_error: The 'gpt-5-codex' model is not supported when using Codex with a ChatGPT account.

What is the expected behavior?

Codex upgrades should preserve working setups via automatic migration and safe fallback behavior.

Expected:

  1. On first launch after upgrade, Codex should auto-migrate legacy profile-v1 config:
    • profile = "<name>" and [profiles.*] -> <name>.config.toml files
    • keep backup and show migration summary
  2. If migration cannot be completed, Codex should warn but still start with safe defaults (not hard-fail startup/config refresh).
  3. Model settings from workspace/repo configs should be validated against auth mode.
    • If unsupported (e.g., gpt-5-codex with ChatGPT auth), show actionable warning and fall back to a supported model.
  4. User should not be forced into manual multi-file config surgery just to recover a previously working environment.

Additional information

  • Date first observed: May 31, 2026
  • Environment: Windows 11, VS Code, Codex IDE extension 1.122.1
  • Auth mode: ChatGPT account (auth_mode=chatgpt), plan: Team
  • Impact: startup errors, model pinned/fallback behavior, and repeated 400 failures until multiple config files were manually edited
  • Config layers involved: user ~/.codex/config.toml, workspace .codex/config.toml, and repo .codex/config.toml
  • Suggestion: include an in-product “Config Migration Assistant” that:
    1. detects legacy profile-v1 keys,
    2. auto-generates <profile>.config.toml,
    3. validates model compatibility for current auth mode,
    4. offers one-click fix.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Config migration needed: legacy profile config and model pinning broke after update