openai / openai/codex

[Bug] Experimental context compaction can resurrect a stale task and lose the current request

Open
#45,464 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Summary

In a real long-running Codex conversation with experimental context compaction enabled, Codex resumed an earlier task state instead of making the current user follow-up the active objective.

The visible symptom was that a new multi-part request was effectively treated as already covered by an earlier deliverable. Codex continued the earlier workstream and failed to answer the newly requested questions. This is a semantic task-continuity failure; it is not established that the raw user text was physically deleted.

Concrete incident (sanitized)
  1. The user first asked for a detailed explanation and deployment-oriented walkthrough of an open-source robotics framework.
  2. The user later asked for a detailed executable notebook. That separate deliverable was created.
  3. The user then sent a new, explicit multi-part follow-up asking about:
    • how a bottle is represented;
    • whether tactile sensing is modeled;
    • the underlying implementation;
    • how to create a new task;
    • how the coding agents are used; and
    • whether the follow-on benchmark uses a similar implementation.
  4. Experimental context compaction occurred while the assistant was working on this conversation.
  5. After resumption, Codex continued around the earlier notebook task and did not answer the new follow-up questions.
  6. The user explicitly repeated the unanswered questions and pointed out that the current instruction had been ignored. The conversation still required additional recovery instead of immediately treating that latest message as the authoritative pending request.

The concrete topic is included only to make the incident reproducible. No private project content is required.

What is actually established
  • Experimental context compaction was enabled and temporally preceded the stale-task continuation.
  • The assistant produced work for an earlier task while the newer user request remained unanswered.
  • The newer request contained several explicit, independently answerable obligations.
  • A corrective follow-up restating those obligations did not immediately restore the correct active task.
What is not established
  • This report does not claim that compaction corrupted or deleted the raw transcript.
  • The exact internal failure boundary is unknown: it may be compaction-summary prioritization, continuation-state selection, or interaction between stale task checkpoints and the latest user input.
  • This report does not assert a billing issue, data leak, or model-wide failure.
Expected behavior

After experimental context compaction, Codex should:

  • treat the newest user message as authoritative unless the user clearly replaces it with another task;
  • preserve a checklist of explicit unresolved questions;
  • distinguish an earlier completed artifact from a later follow-up request;
  • avoid resurrecting an older task merely because it has a durable checkpoint or summary;
  • answer the current request, or ask a targeted clarification if the summary is genuinely insufficient.

A compaction summary should preserve task state as more than a single headline objective: it should retain pending user obligations, completion status per obligation, and the ordering/priority of later user messages.

Suggested regression test

Use one conversation with:

  1. an earlier multi-step task that produces an artifact;
  2. a later follow-up containing at least five explicit questions;
  3. experimental context compaction between the follow-up and the response;
  4. a corrective message identifying the unanswered questions.

The continuation should answer the later questions, should not return to the earlier artifact as if it were the current task, and should retain any still-pending items after the corrective message.

Additional information
  • Observed on September 14, 2026 UTC.
  • Exact client build and model were not captured.
  • Private repository contents, local paths, account information, session identifiers, credentials, and raw transcript excerpts are intentionally omitted.
  • Similar symptoms may overlap with #8648 and #45343, but this report focuses on stale-task resurrection after experimental compaction in a non-delegated task, together with failure to recover after a direct corrective follow-up.

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

Start by reproducing the suggested regression scenario: an earlier artifact-producing task, a later five-question follow-up, experimental compaction, and a corrective message. Trace the experimental compaction and continuation path to determine where pending obligations or message ordering are lost. Done means a regression test shows the later questions remain authoritative and unanswered items survive correction.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
ai-infra-agents, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.