This note describes the persisted-state cutover used by the Codex adaptation work. The goal is to make the old Claude-era files readable while the bot starts writing versioned envelopes.
state.jsonsession_map.jsonmonitor_state.json
The cutover is one-time migration with reversible backups.
When a legacy file is loaded:
- the loader accepts the old shape
- a sidecar backup is created at
*.v1.bak - the file is rewritten in the new versioned shape
Rollback uses the backup sidecar as the source of truth if migration must be reversed.
state.jsongets a top-levelschema_versionandruntime_kindsession_map.jsonis stored as a versioned envelope withschema_version,runtime_kind, andentriesmonitor_state.jsongets a top-levelschema_versionandruntime_kind
- Existing topic bindings are preserved during migration.
- Existing monitor offsets are preserved during migration.
- Legacy files remain recoverable through the backup sidecar.
- Readers continue to accept legacy and versioned shapes during cutover.