openai / openai/codex

GPT-5.6 Terra/Luna prematurely calls final during incomplete long-running tasks until Logout/Login

Open
#43,864 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app bug model-behavior session
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

What version of the Codex App are you using (From “About Codex” dialog)?

Version 26.825.51511

What subscription do you have?

Business

What platform is your computer?

Win 11

What issue are you seeing?

I've been experiencing intermittent premature task termination in the Codex desktop app for approximately the past two weeks.
During long-running agent tasks, Codex sometimes stops execution before the requested work is actually complete. When I ask why it stopped, the model reports that it called final by mistake.

I've observed this with multiple GPT-5.6 configurations:
GPT-5.6 Terra — Medium / Standard
GPT-5.6 Luna — Extra High / Fast

One example - When I said 'continue', the task seems starting but within 1 second, it stopped. So it may be somehow cache/ression related issue. It doesn't seem like it was even connecting to the server when it stopped. That's why it seems like cache related. Most of times, during the executing, it stopped so this may not be a cache issue.

I first noticed the problem after turning my computer back on and asking Codex to resume a task from where it had left off. The task resumed successfully, but then repeatedly stopped in the middle of execution. After several occurrences, I logged out of Codex and logged back in, and the repeated stopping behavior appeared to go away.

However, I've also occasionally observed the same premature termination during normal daytime sessions without a computer restart/resume. This makes me wonder whether there may be some session/context/execution state that accumulates or becomes stale, causing the model or agent loop to incorrectly determine that execution should terminate. Logging out and back in may be resetting that state.

What steps can reproduce the bug?

Actual behavior:
Codex intermittently invokes final while work is still incomplete, causing the agent loop to stop prematurely. Asking it to continue allows execution to resume, indicating that there was still outstanding work.

Reproduction pattern observed

  1. Start a substantial multi-step task in the Codex desktop app.
  2. Allow Codex to execute for an extended period.
  3. In some cases, resume an existing task after the computer/session has been inactive.
  4. Codex continues working normally.
  5. Before all work is complete, execution suddenly stops.
  6. When asked why it stopped, Codex says that it called final by mistake.
  7. Asking it to continue resumes the unfinished work.
  8. The premature stopping may happen repeatedly within the same session.
  9. Logging out and logging back in appeared to clear the repeated behavior in at least one instance.

Frequency

Intermittent, but I've encountered it multiple times over approximately the last two weeks. It appeared particularly reproducible in a resumed session, although I've also seen it during normal active sessions.

What is the expected behavior?

Codex should not invoke final or terminate the agent loop until the requested task and its remaining execution steps are actually complete.
If the agent believes it is finished, there should ideally be a completion check against the active plan/task state before final is allowed to terminate a long-running execution.

Additional information

Possibly related

This appears similar to #32389 — "GPT-5.6 Terra intermittently returns an empty successful final response after tool use, prematurely ending agent loops."

However, I'm filing this separately because my observations include:
GPT-5.6 Luna as well as Terra
Codex desktop app

  • A possible relationship with session/computer resume
  • Repeated premature termination within the same session
  • Behavior apparently improving after logout/login
  • A concrete long-running case that terminated after 30m 11s at 99% progress

I'm not able to confirm whether the underlying response in my case is the same empty successful final response described in #32389, so this may be the same underlying issue or a related session/orchestration issue.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are identified in the report. Start by reproducing a long-running or resumed task in the Codex desktop app, then compare behavior before and after logout/login; done means incomplete work no longer triggers a premature final or agent-loop termination.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
desktop, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.