High: Codex failed contract-first release discipline in long-running coding session

Open 💬 2 comments Opened Jun 19, 2026 by NavinAgrawal

Summary

In a long-running Codex coding session, the agent made release-critical code changes before first establishing a central contract for the affected cross-surface behavior. The user had explicitly expected enterprise-grade, contract-first development where app, API, tests, scripts, config, and environment files align to one canonical contract.

Impact

High. The session touched release readiness work and localization behavior. The agent's workflow created user distrust because it patched behavior and tests surface-by-surface instead of defining the contract first and enforcing it with guardrails.

Expected behavior

For release-critical or cross-surface changes, Codex should:

  1. Identify the canonical contract before modifying implementation code.
  2. Create or update the central contract source first.
  3. Add guardrail tests that fail on contract drift.
  4. Apply implementation changes only after the contract is explicit.
  5. Avoid deleting or narrowing app functionality to make tests pass.
  6. Report failures and skipped gates plainly.

Actual behavior

The agent:

  1. Patched localization-related behavior before centralizing the contract.
  2. Allowed ambiguity between language-only values and locale-region pairs to remain until the user challenged it.
  3. Created a GitHub issue in the user's application repository when the user asked for feedback to be filed for OpenAI/Codex.
  4. Required user intervention to redirect the process back to contract-first engineering.

Requested improvement

Codex should have a stronger policy gate for cross-surface release work:

  • If a change spans app/API/tests/scripts/config/env, require a canonical contract before implementation.
  • If the user asks to file feedback about Codex/OpenAI behavior, do not create an issue in the user's product repo unless explicitly requested.
  • Treat contract drift as a blocking engineering defect, not as a late-stage cleanup item.

Environment

Codex CLI in a local repository session. The issue is about agent behavior and workflow discipline, not a project-specific product defect.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗