Skip to content

AbsolutePathBuf deserialized without a base path - Codex

Quick fix

On Codex for macOS, relative paths written by cc-switch cause this error. Change model_catalog_json in ~/.codex/config.toml to an absolute path.

Error output
创建任务时出错
invalid configuration: AbsolutePathBuf deserialized without a base path
in `model_catalog_json`
English translation

Error creating task invalid configuration: AbsolutePathBuf deserialized without a base path in `model_catalog_json`

Since cc-switch v3.16.2, the program writes `model_catalog_json` as a relative path (such as `cc-switch-model-catalog.json`). This works on WSL/Windows, but when Codex desktop starts on macOS, the missing base path causes deserialization to fail and throws this error. The issue exists from cc-switch v3.16.2 through v3.19.0 and recurs every time cc-switch writes the configuration.

  1. Open the Codex configuration file `~/.codex/config.toml`.

  2. Find the `model_catalog_json` field and change it from a relative path to an absolute path (replace `<user>` with your actual macOS username).

    ~/.codex/config.toml
    model_catalog_json = "cc-switch-model-catalog.json"
    model_catalog_json = "/Users/<user>/.codex/cc-switch-model-catalog.json"
  3. Alternatively, run the following command in the macOS terminal to replace it in one step: ```bash sed -i '' 's|model_catalog_json = "cc-switch-model-catalog.json"|model_catalog_json = "'"$HOME"'/.codex/cc-switch-model-catalog.json"|' ~/.codex/config.toml ```

ToolCodex
Version0.144.1 / 26.721.41059
PlatformsmacOS
Why does this not happen on Windows/WSL?
Codex can correctly resolve the relative path written by cc-switch on Windows/WSL, but the macOS desktop client strictly requires an absolute path during deserialization, so the error occurs only on macOS.
Will restoring a database backup through cc-switch fix it?
One user reported that restoring the latest database backup temporarily restored normal operation, but this is not a root fix. The issue recurs every time cc-switch writes the configuration, so you must manually change the configuration file to an absolute path.
What if the configuration also shows `url is not supported for stdio`?
This is another known issue with cc-switch MCP sync. When writing back `config.toml`, it incorrectly appends HTTP fields to an existing stdio entry. Manually edit `~/.codex/config.toml`, remove the conflicting `command`, `args`, and `type = "stdio"` fields, and keep only the `url`-related configuration.

This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.