Codex CLI 5.4 regression: merge-train / until-done lanes stop before merge and next-slice continuation

Resolved 💬 4 comments Opened Mar 10, 2026 by SlipstreamAI Closed Mar 10, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

Summary

Codex CLI 5.4 appears to regress unattended merge-train behavior compared with 5.3.

In a strict one-lane-at-a-time WP merge train, Codex is expected to:

  1. stay on the active PR until merge is actually complete
  2. not treat an initial green or partial CI wave as completion
  3. merge once branch policy and checks allow it
  4. fast-forward local main
  5. immediately continue to the next queued slice
  6. repeat until the full queue is done or a concrete fail-closed blocker exists

Instead, Codex 5.4 repeatedly drifts into status narration or partial-completion behavior before the merge boundary is actually crossed.

Expected behavior

For workflows with explicit instructions like:

  • one active merge lane
  • complete each slice end to end
  • merge before continuing
  • do not hand off until the queue is actually done

Codex should remain attached to the active PR through:

  • guard-fix loops
  • CI waiting
  • merge retry after checks clear
  • post-merge local sync
  • next-slice branch creation
  • and only then advance the mission state

Actual behavior

Observed behavior on Codex CLI 5.4:

  • fixes PR-level blockers
  • watches some CI
  • responds as though work is effectively complete while long-running required checks are still pending
  • fails to leave a durable watcher or merge loop that merges immediately after checks turn green
  • does not automatically continue to the next slice after merge
  • requires repeated human intervention to tell it to keep going

This breaks unattended merge-train and goodnight-style workflows.

Regression signal

From operator experience:

  • Codex CLI 5.3 did not exhibit this behavior in the same workflow
  • Codex CLI 5.4 does

Concrete failure mode

The agent behaves as if these are equivalent:

  • PR opened
  • some checks passed
  • mergeable soon
  • merged

But in merge-train workflows only the last one should advance the lane.

Why this matters

This is not just a conversational annoyance. It breaks operator trust in an execution model that is explicitly supposed to be:

  • serialized
  • durable
  • resumable
  • and non-interrupting until queue completion or a real blocker

The workflow becomes fragmented because Codex keeps effectively stopping at the exact point where it should still be driving.

Proposed fix direction

Codex should have a stronger internal execution contract for explicit merge-train and until-done instructions:

  • do not mark a merge phase successful until merge is confirmed by GitHub
  • if checks are pending, keep waiting
  • if checks fail, fix them or surface the concrete blocker
  • if checks become green, attempt merge again automatically
  • after merge, sync local state and continue to the next queued item without requiring a new human prompt
  • preserve this behavior across long CI durations and repeated reruns

Environment

  • repo-local workflow with strict single active WP lane
  • Codex CLI authenticated via ChatGPT or Codex account flow
  • merge-train style instructions with explicit "do not stop until every slice is implemented and merged"
  • behavior observed on Codex CLI 5.4

User impact

This makes Codex unreliable for unattended execution workflows and can leave project state split across:

  • merged slices
  • local-only slices
  • open PRs waiting for merges that should have been automatic
  • and partial until-done checkpoints that require manual babysitting

View original on GitHub ↗

4 Comments

github-actions[bot] contributor · 5 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #13950

Powered by Codex Action

etraut-openai contributor · 5 months ago

Thanks for the bug report. We'll share the feedback with the team responsible for training our codex models. If you see other model behavior that you'd like to report, please use the /feedback command. That will provide us with additional details including logs and conversation text.

SlipstreamAI · 5 months ago

Thank you sir, this was the models response to this; Honest read: mostly a model / execution-behavior issue, not a you wrote bad AGENTS.md issue.

My breakdown:

  • Primary: Codex 5.4 behavior/regression
  • Secondary: GitHub/CI state weirdness making the behavior worse
  • Tertiary: your workflow is strict and complex, so it exposes the weakness faster

Why I say that:

  1. Your instructions are already explicit.

Your repo says, in multiple places, effectively:

  • one active lane
  • complete the WP end to end
  • publish
  • wait for CI
  • merge
  • continue automatically
  • do not stop unless there is a real blocker

That is not ambiguous.

  1. I violated the workflow even when the instructions were clear.

That points at the agent behavior, not your spec.

  1. The failure mode is very specific.

The bad behavior was:

  • treating “PR opened” or “some checks passed” as a pseudo-finish line
  • drifting into status narration before merged=true
  • not always holding the merge gate until completion

That is exactly a model/execution-loop problem.

  1. GitHub state made it worse, but didn’t create it.

We saw:

  • stale failed checks
  • reruns still showing old red statuses
  • gh/API disagreement at moments

That can confuse the agent, but a good merge-train behavior should still handle it by staying in the loop until the final state is unambiguous.

  1. Your AGENTS/workflow are strict, but valid.

They are not “too much” in the sense of causing the wrong behavior.
They may be demanding, but that is the point of a governed merge train.
A capable agent should still obey them.

So the short version is:

  • Not mainly your fault
  • Not mainly an AGENTS.md design flaw
  • Mostly a Codex 5.4 execution-discipline problem
  • Amplified by long CI / GitHub async state

What is worth improving on your side anyway:

  • reduce discretion at merge boundaries
  • make “phase success” machine-enforced, not model-inferred
  • use a script/state machine for:
  • wait for checks
  • merge
  • pull main
  • start next WP
  • treat any assistant response before merged=true as non-terminal

In other words:
your workflow exposed the bug; it probably didn’t create it.

That’s also why filing the issue in openai/codex was the right move.

› this is making using codex beyond unusable.. thinking to switch to claude code

• That reaction makes sense.

If your top requirement is:

  • strict merge-train obedience
  • unattended continuation
  • not needing to babysit the agent

then switching your primary operator is a rational move.

My honest recommendation right now:

  • this session shows Codex is currently unreliable at the exact boundary you care most about
  • even when the coding was fine, the execution discipline around wait -> merge -> continue was not good enough
  • for your workflow, that makes it operationally expensive

Best setup for you:

  1. Agent writes code
  2. Scripts own:
  • check polling
  • merge
  • pull main
  • next-WP handoff
  1. Agent does not get to “decide” whether the lane is done before merged=true

So I would not make this an all-or-nothing religious choice.
I would make it an ops choice:

  • Claude Code for autonomous lane driving
  • Codex for coding assistance and smaller bounded tasks
  • repo scripts for merge-train truth

That’s the most robust setup until Codex fixes the issue we filed.

And yes: based on this session, I think “Codex beyond unusable” for your specific unattended merge-train use case is a fair description.

SlipstreamAI · 5 months ago

@etraut-openai .. i literally feel like you dont understand how bad this is going to be for Codex users.. this will dismantle enterprise workflows.

That reaction makes sense.

If your top requirement is:

  • strict merge-train obedience
  • unattended continuation
  • not needing to babysit the agent

then switching your primary operator is a rational move.

My honest recommendation right now:

  • this session shows Codex is currently unreliable at the exact boundary you care most about
  • even when the coding was fine, the execution discipline around wait -> merge -> continue was not good enough
  • for your workflow, that makes it operationally expensive

Best setup for you:

  1. Agent writes code
  2. Scripts own:
  • check polling
  • merge
  • pull main
  • next-WP handoff
  1. Agent does not get to “decide” whether the lane is done before merged=true

So I would not make this an all-or-nothing religious choice.
I would make it an ops choice:

  • Claude Code for autonomous lane driving
  • Codex for coding assistance and smaller bounded tasks
  • repo scripts for merge-train truth

That’s the most robust setup until Codex fixes the issue we filed.

And yes: based on this session, I think “Codex beyond unusable” for your specific unattended merge-train use case is a fair description.

If you want the fastest recovery path, I can help you do this next:

  • adapt your current AGENTS / merge-train workflow to be model-agnostic
  • so you can swap Claude in without rebuilding the whole system again

• Feedback uploaded. Please open an issue using the following URL:

thread ID 019cd668-2246-7ed2-b6f1-6cff072252bb in an existing issue.