Cross-cutting persistence abstractions and data stores
Cross-cutting persistence abstractions and data stores stage-21 (cross-cutting infrastructure)
This stage is the system’s long-term memory and filing system. It is shared support used throughout startup, normal work, recovery, and cleanup, rather than one single user-facing flow. Its parts save different kinds of information so the app can resume work, avoid repeats, and keep private data safe.
Rollout files and thread-store persistence keep conversation records: raw session logs, searchable indexes, live writers for active chats, and tools to list, rebuild, archive, or delete threads. SQLite runtime state and agent graph storage keep structured records in a small local database, such as thread summaries, goals, agent jobs, progress checkpoints, audit views, and “which agent started which thread.” Caches and local lookup files store reusable facts like cloud settings, connector lists, plugin catalogs, models, update notices, and local plugin paths, while checking age, account, and version before trusting them. Plugin, secrets, and memory stores manage installed plugins, encrypted secret values, and saved user memories. External session import persistence reads conversation files from other tools and keeps a ledger so the same outside session is not imported twice.
Sub-stages
State registers touched28
reg-effective-configThe final set of settings Codex runs with after combining files, policies, profiles, cloud settings, thread overrides, and command-line flags.reg-feature-flagsThe shared list of enabled or disabled experimental and product features that changes what the app exposes.reg-install-home-contextThe discovered Codex home folder, install location, bundled resources, and stable local installation identity.reg-auth-identityThe signed-in user or service identity, including account facts such as email, plan, workspace, and login mode.reg-credential-storeThe saved tokens, API keys, OAuth credentials, MCP tokens, and other secrets used to authenticate later requests.reg-rate-limit-quotaThe current account limits, credit status, token usage, and reset information used to avoid overusing backend services.reg-state-databasesThe opened local SQLite stores and migration state that hold structured runtime data for threads, agents, goals, jobs, and summaries.reg-rollout-thread-storeThe durable conversation log and searchable thread index used to resume, rebuild, archive, restore, and display sessions.reg-cloud-config-cacheThe cached and refreshed cloud-delivered configuration bundles that can alter settings, requirements, and available features.reg-model-provider-catalogThe combined menu of usable model providers and models from bundled data, cache, live services, local servers, and account access.reg-mcp-server-sessionsThe configured and connected MCP tool servers, their tools, resources, login state, approval rules, and active sessions.reg-plugin-marketplace-catalogThe installed, built-in, workspace, and marketplace plugin information that controls extra tools, hooks, connectors, and prompt additions.reg-extension-host-stateThe shared extension runtime state and contributor hooks that let add-ons react to threads, turns, tools, prompts, events, and MCP setup.reg-skills-catalogThe available skills list, including where each skill came from, whether it is enabled, and the instructions it can add to a session.reg-memory-storeThe saved long-term user memories and memory search results that can be loaded, updated, and inserted into future conversations.reg-thread-session-stateThe live state of a conversation thread, including its identity, workspace, selected model, history, permissions, listeners, and lifecycle status.reg-conversation-history-budgetThe accumulated messages, compacted summaries, token counts, and trimming decisions that determine what conversation context still fits.reg-agent-registry-graphThe live and persisted map of parent agents, child agents, thread names, statuses, and which helper agents are still open.reg-background-work-queuesThe shared set of background tasks such as cloud refreshes, cleanup jobs, memory jobs, skill watchers, agent jobs, update checks, and session maintenance.reg-tui-visible-stateThe current terminal user-interface state, including visible transcript cells, inputs, popups, keymaps, headers, status lines, notifications, and restored history.reg-observability-telemetryThe shared logs, traces, metrics, analytics facts, rollout tracing, debug captures, and feedback evidence used to understand what happened.reg-goal-stateThe live and persisted user goals, goal progress, and goal-thread associations synchronized into prompts, storage, analytics, and UI indicators.reg-update-check-stateCached update notices, downloaded-or-pending update metadata, and daemon restart/update status produced by update checks and consumed by UI or teardown restart logic.reg-external-import-ledgerThe persisted ledger of external-agent sessions already imported, used to avoid duplicate imports and track import provenance.reg-connector-directory-cacheCached ChatGPT/app connector directories, workspace connector settings, local connector metadata, and fallback lookup results used when exposing connectors to sessions and prompts.reg-cloud-task-stateCloud task lists, task details, submission attempts, selected task environments, and polling/refresh status shared by cloud task commands and clients.reg-project-trust-storePersisted and effective trust decisions for workspaces/projects that influence onboarding, permission assembly, sandbox behavior, and session startup.reg-memory-write-safety-stateCached or in-flight safety decisions for whether proposed long-term memory writes should be allowed before they update the memory store.