Commit Graph
1 Commits
Author SHA1 Message Date
yetone ef6f3749d0 agent: Codex's config never names magpie's model list once it is gone (zwaydot on X)
zwaydot tried magpie, disconnected Codex, and the ChatGPT app no longer
opened: "ChatGPT configuration could not be loaded … No such file or
directory (os error 2)". Codex reads the file model_catalog_json names
as it loads its config, and loads none at all when it is missing, the
CLI and the app both.

Cause: dropList removed ~/.codex/magpie-models.json whatever Codex's
provider was (Unwire calls it unconditionally at its end), while
model_catalog_json was taken out of config.toml only by dropProvider,
and only while model_provider was still "magpie". A config whose
provider was moved off magpie (taken out, or set to another provider by
the app, another tool or a hand edit) while it still named magpie's
list was left, after Disconnect or Unwire, naming the removed file.
Separately, Disconnect put back the user's own model_catalog_json from
before magpie without checking its file was still there.

Now:
- dropList takes model_catalog_json out wherever it names magpie's list
  and the list is gone (known gone: a Stat that fails otherwise is not
  taken for it);
- a model_catalog_json of the user's own is put back only while its file
  is there (not judged in a WSL distro, whose spelling this side can't
  look at);
- Sync (run at every start through SyncCatalog, connected or not) mends a
  config already in this state: magpie's list written again while magpie
  is the provider, else the key taken out. Users already hit by this are
  fixed by updating and starting magpie, with no reconnect.

The workaround given on X (delete model_catalog_json, and
model_provider = "magpie" if it is there, from ~/.codex/config.toml) is
right: it is what this does by hand.

Not a second bug: the screenshot's Agents list has no Codex row because
a disconnected Codex is under "Show N more", whose button sits in the
middle of the bar under the list, right where the ChatGPT alert is.
Codex is detected by ~/.codex/config.toml and the ChatGPT.app bundle
(com.openai.codex) stands for its CLI (HasApp, TestCodexAppVersion).
2026-10-22 20:14:54 +08:00