# Remote Codex Config

## Current Design

- Staging mounts a PVC at `$CODEX_HOME`.
- Prod uses an `emptyDir` for `$CODEX_HOME` and mounts only `auth.json` from Secret.
- The container entrypoint installs skills into `$CODEX_HOME/skills`, but previously did not enforce `config.toml`.

## Risks

- Editing only a local `~/.codex/config.toml` does not affect the auto-oncall pod.
- Editing only the current staging PVC does not help prod because prod recreates `$CODEX_HOME` from `emptyDir`.
- `features.apps` must not depend on a manual one-off pod edit after a restart or image rollout.

## Target Contract

- Every auto-oncall container startup ensures `$CODEX_HOME/config.toml` contains `[features] apps = false`.
- Existing Codex config content is preserved where possible.
- Current staging runtime is hot-patched so the running pod matches the target immediately.

## Verification Checklist

- Run the entrypoint script against temporary config fixtures.
- Verify staging pod `$CODEX_HOME/config.toml` contains exactly `apps = false` under `[features]`.
- For durable rollout, build/deploy an image containing the entrypoint change.
