compact fails

Resolved 💬 3 comments Opened Nov 29, 2025 by OperationalFallacy Closed Dec 11, 2025
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of Codex is running?

0.63.0

What subscription do you have?

plus

Which model were you using?

5.1-codex

What platform is your computer?

mac

What issue are you seeing?

■ Error running remote compact task: unexpected status 401 Unauthorized: {
  "error": {
    "message": "Your request to POST /v1/responses/compact must be made with a session key (that is, it can only be made from the browser). You made it with the following key type: .",
    "type": "invalid_request_error",
    "param": null,
    "code": "missing_scope"
  }
}

What steps can reproduce the bug?

Uploaded thread: 019ad09f-682f-77f3-9bae-d7a61eb76d50

What is the expected behavior?

codex UX on selecting profiles is not designed well. I'm using plus subscription, personal api keys, and keys from work project.

I have to carefully edit toml file to make it semi-usable, e.g. combination of "providers", "models" and "keys"

And then codex upgraded and started overwriting models in the toml global section which made profiles break.

The whole UX what "environment" codex is using is just bad. Starting with ridiculous "toml" multi-layer config format with internal configuration "logic", and on top of that codex binary making changes to it during upgrades.

I want just one thing to set up named environment, or profile or whatever you want to call it that defines isolated setup that codex can't overwrite with changes during upgrade.

Right now all this toml config mess leads to the errors like above.

Additional information

_No response_

View original on GitHub ↗

3 Comments

github-actions[bot] contributor · 9 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #7335
  • #7321
  • #7250
  • #6946
  • #6935

Powered by Codex Action

etraut-openai contributor · 9 months ago

Can you provide the config settings that result in the compact error? Does this happen with default configuration settings, or do you suspect that it's related to one of the more advanced (non-default) configuration settings that you're using in your config.toml file?

It's true that the config.toml provides lots of configurability for different providers and models, but most of that is to accommodate model providers other than OpenAI — for example, locally-hosted models. Since you're using a cloud-hosted model from OpenAI, you shouldn't need to use these more advanced configuration settings. You can even use the /model slash command or the -m command-line switch to specify the model if that's more convenient.

etraut-openai contributor · 8 months ago

No response, so closing.