3 Commits
Author SHA1 Message Date
tevansandClaude Opus 4.8 aedbf8a515 Stop emitting legacy Codex profile config; preserve settings after managed block
Codex 0.144+ refuses to load any config containing the top-level
`profile = "..."` key or `[profiles.<name>]` tables, so every machine running
the kit's output hit "Error loading configuration" and codex would not start.

Profiles now live in per-profile files:
- templates/global/{economy,balanced,deep}.config.toml, installed to
  ~/.codex/<name>.config.toml and selected with `codex --profile <name>`
- config.toml keeps the balanced values as its defaults, so plain `codex`
  behaves as before without a profile selector

`profile` and `profiles.*` stay in the installer's strip lists so upgrading an
existing machine removes the legacy keys from its live config.

Also fixes two latent bugs in the merge, both hit while testing the above:
- Only text *before* the managed block was retained, so anything after it was
  silently deleted on every install. `codex mcp add` appends [mcp_servers.*] to
  the end of config.toml, so those servers would be wiped. Both sides are now
  kept and filtered.
- The config was read with the locale default encoding and a leading BOM was
  preserved, which could strand the BOM mid-file once content was merged around
  the block -- invalid TOML. Read as utf-8-sig, write utf-8.

Verified against a seeded legacy config (BOM at byte 0, machine-specific
[mcp_servers] on both sides of the block): legacy keys stripped, both sides
preserved, idempotent across three runs, and `codex --profile economy exec`
returns a live model response.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-15 21:10:03 +01:00
slaguru666 de379e44ba Add new machine rollout guide 2026-04-12 14:05:48 +01:00
slaguru666 aa907983db Add portable Codex ops kit 2026-04-12 14:00:55 +01:00