Using Codex During a Production Incident Without Exposing Customer Data
Stabilize production, build a sanitized timeline, test causes with read-only checks, and document the verified fix without customer records.
During a production incident I stabilize the service before asking Codex to investigate. Rate limits, rollback, feature flags, or traffic controls may reduce harm while the cause remains unknown. The incident lead decides those actions and records them on the timeline.
Codex receives sanitized evidence: UTC timestamps, generalized request paths, status codes, durations, deployment hashes, and synthetic identifiers. Customer records and credentials stay in authorized systems.
Stabilize and assign roles
The incident lead owns decisions, an operator performs approved changes, and a recorder maintains the timeline. I define the affected user journey and current impact without copying customer messages into the AI thread.
Read-only diagnosis can begin while a rollback or containment action runs. Competing changes stop unless the lead approves them.
Build a sanitized timeline
I record deployments, alerts, error-rate changes, dependency events, and operator actions in UTC. Identifiers become stable synthetic labels. I keep raw evidence in the approved incident system and share only the fields needed to test a hypothesis.
Codex can compare the timeline with repository history and deployment configuration. It should distinguish observed correlation from cause.
Test causes with read-only checks
I start with deployed commit, service health, configuration names, queue depth, recent errors, and dependency status. Each hypothesis predicts an observation. A failing prediction removes the hypothesis instead of producing another speculative change.
Queries use bounded time windows and selected fields. I avoid dumping complete logs or database rows.
Review every proposed action
A proposed command states target, expected effect, risk, rollback, and approver. I resolve account, region, cluster, and service before execution. Destructive changes wait even when the model labels them urgent.
If Codex suggests widening permissions or disabling a control, I look for a safer diagnostic path and require stronger evidence.
Verify recovery
I compare error rate, latency, queue behavior, and the affected user path with the pre-incident baseline. A quiet log can mean traffic disappeared, so I include successful requests and monitoring coverage.
The fix receives a regression test or configuration check. Temporary mitigations get an owner and removal date.
Close the privacy loop
I review the thread, attachments, copied commands, and generated files for sensitive data. Any exposed credential rotates. The incident report uses bounded facts and separates verified cause from open questions.
- Service stabilization comes first.
- Shared evidence is sanitized.
- Diagnosis begins read-only.
- Writes require explicit approval.
- Recovery and privacy receive verification.
Need a safer development workflow?
Terry Hunt Dev helps teams prepare safer incident and deployment procedures through DevOps consulting. Use the contact page for a process review, without customer data or private logs.