Skip to content

Compaction during a send_message_to_thread-triggered turn can revive an obsolete instruction and produce an incorrect execution report #42695

Open

Description

@HS7097

Environment

  • Codex Desktop on Windows
  • Bundled CLI: 0.153.0

Summary

A task delivered through send_message_to_thread was received and partially executed correctly. After automatic mid-turn compaction, the receiving agent reverted to an older, already-completed instruction instead of finishing the current task.

Its final response then incorrectly reported that no task execution had occurred, despite successful tool results and files created earlier in the same turn.

Why send_message_to_thread is used

Long-running work is often split across existing specialist threads. A coordinator delegates one current task to a thread that already holds the relevant project context, then waits for that thread's result. This avoids recreating context, busy polling, and keeping one oversized turn alive while unrelated work runs elsewhere.

For this workflow to be reliable, the latest delegated task must remain the receiving thread's current authoritative instruction across automatic compaction. Source attribution may remain metadata, but it must not cause the instruction to be treated like disposable command output.

Observed Sequence

The following task labels are illustrative, not original prompt text:

  1. A thread previously completed Task A.
  2. Another thread delivered Task B through send_message_to_thread.
  3. The receiving agent acknowledged Task B and performed several authorized actions.
  4. Automatic context compaction occurred before Task B's final reporting was complete.
  5. Without a new instruction reinstating Task A, the agent resumed following Task A.
  6. The final response described the obsolete task and contradicted execution evidence from the current turn.

Local Evidence

Inspection of the local rollout showed:

  • The incoming Task B instruction was recorded as a function_call_output associated with send_message_to_thread.
  • Successful execution records existed before compaction.
  • The replacement history retained the older Task A instruction as a visible user message.
  • Task B's original cross-thread message was absent from the verbatim replacement history.
  • An opaque compaction item was also present. Its contents cannot be inspected, so this does not establish that Task B was entirely absent from the compressed summary.

The observable failure is that the post-compaction continuation followed an obsolete instruction and produced an inaccurate execution report.

Requested Resolution

Please make a delegated task durable through one of these equivalent semantic designs:

  1. Restore send_message_to_thread delivery as a first-class user message in the receiving thread, while keeping sender/source attribution in separate metadata; or
  2. Persist the delivery as a dedicated first-class delegated-instruction record that compaction treats as current semantic input, not as ordinary tool output.

In either design, compaction should preserve:

  • the latest delegated instruction and its stable message identity;
  • completed actions and their results from the current turn;
  • remaining work, constraints, and the requested delivery target;
  • the fact that superseded or completed instructions are no longer current.

An older visible user prompt must not regain authority merely because the current instruction arrived through cross-thread delivery.

Current Workaround and Evidence

A local workaround sends the same text through the desktop/app-server message path as a first-class user message with a stable clientUserMessageId, instead of recording it as tool output. Across seven subsequent natural mid-turn compactions, the latest delegated task remained the last user instruction in replacement history and each receiving thread continued the correct task. No objective reversion was observed in those samples.

This is not evidence that the product bug is fixed, and it does not prove the complete root cause. It does indicate that preserving the delegated task's semantic role across compaction is an effective mitigation.

Expected Behavior

Compaction should preserve the current cross-thread task, completed actions, remaining work, and applicable constraints. An already-completed instruction should not regain authority over the active task.

Final reporting should remain consistent with actions already performed in that turn.

Related Reports

This report specifically concerns send_message_to_thread input. Whether it shares the same root cause requires investigation.

Privacy

Original screenshots, prompts, task outputs, identifiers, and raw logs are intentionally omitted.

Activity

  1. added
    bugSomething isn't working
    appIssues related to the Codex desktop app
    contextIssues related to context management (including compaction)
    sessionIssues involving session (thread) management, resuming, forking, naming, archiving
    on Sep 4, 2026
  2. github-actions commented on Sep 4, 2026

    @github-actions
    Contributor
  3. 345180376-web commented on Sep 6, 2026

    @345180376-web

    Adding two independent macOS observations of the same failure pattern, on a newer bundled CLI. This is additional evidence, not confirmation of a shared root cause.

    Environment

    • Codex desktop: 26.901.51231
    • Bundled codex-cli 0.153.4
    • macOS (exact OS build omitted; not captured in this report)
    • Visible runtime metadata for both failed turns: gpt-6-astra / xhigh; service tier not recorded.

    Observed sequence

    The task descriptions below are sanitized paraphrases, not original prompts.

    1. A receiving thread was given a narrow delegated task through send_message_to_thread: review 40 fixed event records and write one candidate table. It acknowledged the correct task and reported progress. A mid-turn contextCompaction event then occurred. The subsequent final response answered an older, unrelated topic; the required output file did not exist at that point.
    2. A separate receiving thread was given a narrow independent-review task. It also initially acknowledged the correct task. Following a mid-turn contextCompaction event, it answered an older recovery-planning topic instead, without the requested review verdict.

    Both turns completed, but neither completion satisfied its current delegated assignment. No new instruction had reinstated the older topic.

    Evidence boundaries

    • The App records display the incoming dispatch as functionCallOutput / send_message_to_thread. This does not by itself establish its inference-message role or priority.
    • A fresh local CLI features listing reported remote_compaction_v2=true; the exact branch taken by the two existing failed turns is unverified.
    • The actual compaction-summary contents and immediate post-compaction model inputs were not available for inspection.
    • A changed-method retry (checkpoint first, save small batches) completed all 40 records, but had zero compaction events. It therefore does not demonstrate that the compaction failure is fixed.
    • We have not tested the app-server workaround described in the issue.

    Unconfirmed source-code lead

    The public rust-v0.153.4 compact_remote_v2.rs has build_v2_compacted_history and is_retained_for_remote_compaction_v2; ordinary FunctionCallOutput items are not directly retained as raw items by that filter. This does not prove their content is omitted from the compaction output, and a matching version number does not establish binary identity with the desktop build.

    Please investigate preservation of the latest authenticated delegated instruction, its constraints, completed actions and remaining deliverable across genuine mid-turn compaction. A regression should contrast a no-compaction baseline with actual mid-turn compaction, and verify that older paused/completed tasks are not revived. If recovery is impossible, an explicit blocked result is preferable to silently completing the wrong task. Arbitrary tool output should not be promoted into trusted instructions as a workaround.

    No email address, account information, conversation/task identifiers, local paths, business material, screenshots or raw logs are included.

  4. FrankHZ commented on Sep 11, 2026

    @FrankHZ

    Reproduced again on Windows Codex Desktop with bundled codex-cli 0.153.4 on September 10, 2026 (America/Chicago).

    Sanitized timeline, in CDT (UTC−05:00):

    • 23:14:38: A coordinator delivered a new investigation through cross-task delegation, recorded as function_call_output with a codex_delegation wrapper. The receiver acknowledged the correct assignment.
    • 23:25:20: The receiver reported a concrete finding relevant to that investigation and said it was checking the remaining evidence.
    • 23:28:26: A genuine mid-turn compacted record appeared. The visible replacement history retained the earlier user instruction to wait for further instructions; the current delegation's original input was not present verbatim. An opaque compaction item was present, so this does not establish what its summary encoded.
    • 23:28:31: The receiver ended with an acknowledgment of the previous completed task and said it was waiting for further instructions, instead of delivering the active investigation.
    • 23:37:50: The user had to remind it to follow the prior assignment.

    PR #44659 was merged earlier that day, but this reproduction occurred on the older 0.153.4 desktop backend. It is not evidence of a regression after that PR. The PR appears to propagate turn_trigger metadata for delegated usage; its diff does not establish a fix for preservation of the active delegated instruction across compaction. Could maintainers confirm whether #42695 is covered by that change or needs a separate fix?

    No raw logs, original assignment text, project paths, account details, or task identifiers are included.

  5. HS7097 commented on Sep 13, 2026

    @HS7097
    Author

    Additional evidence: this failure was absent during experimental context management and returned with conventional compaction

    Environment: Windows, Codex Desktop 26.908.4834.0, running bundled codex-cli 0.154.0-alpha.6.2.

    I want to clarify an important difference in my observed experience: while my sessions were using experimental context management, I did not observe the obsolete-instruction replay or unrequested early stopping described in #42695. These behaviors reappeared after the sessions returned to conventional compaction.

    The local records support this before/after observation.

    During the experimental workflow, the agents saved checkpoints, explicitly called new_context, and recovered their state through notes and history retrieval. I audited eleven explicit transitions across three tasks on September 11. Their subsequent visible behavior continued the expected work and respected the latest applicable instructions. No obsolete-instruction replay or unrequested stopping was observed in those transitions. Where a new pause instruction was actually given, it was followed correctly.

    On September 13, the affected sessions instead recorded opaque summary-compaction items without the preceding new_context/checkpoint transition sequence. Shortly afterward, a coordinator and a delegated worker revived previously fulfilled pause instructions despite having acknowledged and acted on newer resume instructions.

    The worker still recognized its current work item, but its continuation and reporting conditions reverted. In the coordinator’s case, both the older pause instruction and the newer direct user resume message remained visible in replacement history, yet it subsequently marked its unfinished goal as blocked.

    This is relevant to Tibo’s September 12 announcement, which says an opt-in context management experiment was disabled because it could cause early stops or replies to older messages. In my observed sessions, the experimental workflow was the period without this failure; recurrence was associated with the return to conventional compaction.

    The local experimental_mode setting remains enabled. I cannot independently verify the server-side experiment state or its exact transition time. This is an observational comparison, not a controlled same-input A/B test. The opaque compaction contents also cannot be inspected, so absence from visible replacement history does not establish complete omission from the compressed context.

    The public 0.154.0-alpha.6.2 release includes the corresponding change from PR #44659 through a backport. That PR describes turn-trigger propagation for delegated usage attribution; this report concerns preservation and application of the current instruction and task state.

    Could maintainers clarify whether the experiment shutdown was intended to address #42695, what behavior existing opt-in sessions should now use, and whether the conventional compaction path needs a separate fix for completed or superseded instructions becoming active again?

    Regression coverage should include genuine compaction after an acknowledged resume instruction and verify that obsolete pause conditions remain inactive.

  6. IvanKashitskii commented on Sep 16, 2026

    @IvanKashitskii

    Additional Windows reproduction, observed September 15–16, 2026. This report was prepared with Codex from local rollout inspection at the user's request. Project contents and identifiers are omitted; A/B below are sanitized task labels.

    Environment at investigation

    • Windows Codex desktop package: 26.908.9136.0
    • Running bundled executable: codex-cli 0.154.0-alpha.6.2
    • These versions were checked after the incident; they are not a verified version history for every earlier turn.

    Observed evidence

    The same long-running receiving thread had an old direct user message stopping an earlier experiment A. Later authorized assignments to continue work B arrived via send_message_to_thread, represented in the rollout as named function_call_output items with namespace codex_app. The receiver acknowledged and executed B.

    All five inspected compacted.replacement_history records retained the same old stop as their last explicit user message. Later delegated assignments were absent as separate verbatim items. An encrypted compaction item was present, so this does NOT prove those assignments were absent from the compressed representation.

    The latest incident has this sequence (UTC, September 16):

    • 17:31:53: the current assignment B arrived via cross-thread delivery.
    • 18:07:32: the receiver reported progress on B and said it would save the remaining outputs and finish verification.
    • 18:08:54: mid-turn compaction occurred.
    • 18:08:54: a local SessionStart reminder was actually injected as a developer message, explicitly saying the old stop was not a new command.
    • 18:08:58: the receiver announced that it was stopping experiment A.
    • 18:09:02: it read a persisted task-state note explicitly identifying B as current and the old stop as inapplicable.
    • 18:09:22: it nevertheless ended with a stopped-work report.

    No new user stop appeared between that compaction and the final response. Similar obsolete-stop responses followed two September 15 compactions. A September 16 17:41 compaction was followed by correct continuation, so this is not a deterministic failure at every compaction. The local reminder/checkpoint approach did not prevent the latest failure.

    Source-code lead, not a verified root-cause patch

    At public commit 43354d0f61c1bda3eff26decaf13276bb57039e7, core/src/compact_remote_v2.rs::is_retained_for_remote_compaction_v2 retains certain AgentMessage/Message items but returns false for FunctionCallOutput. The public TUI's dynamic_tools.rs::start_turn intentionally delivers delegated input through TurnStartParams.tool_output to preserve tool authority. This is consistent with the observed difference in verbatim retention, but the exact source revision of the installed alpha build and contents of its encrypted compaction item have not been verified.

    Please investigate preservation of the latest authorized delegated assignment, its source/order/scope, and already-completed work across repeated compactions. A product-level fix should preserve provenance rather than promote arbitrary tool text to user authority. A regression case should cover old stop-A → newer delegated continue-B → repeated compaction → continue B, and separately confirm that a genuinely new stop-B is honored.

    No raw logs, original prompts, screenshots, local paths, or task/account identifiers are attached.

  7. andriyo commented on Sep 29, 2026

    @andriyo

    Additional macOS occurrence observed on September 29, 2026. Prepared with Codex from inspection of the affected chat history at my request. Task A/B below are sanitized descriptions.

    Environment

    • Installed Codex desktop app at investigation: 26.924.22138, build 11645, macOS. Version/build read from the app bundle after the incident; the executable version used by the failed turn was not independently verified.
    • No deliberate compaction experiment was run.

    Observed sequence

    1. The receiving chat had previously answered a direct user question about a repository method's name (Task A).
    2. A coordinator sent a different, read-only issue-status follow-up through send_message_to_thread (Task B). The app displayed it as “Sent by ChatGPT from another task.”
    3. The inspected turn records the incoming request as functionCallOutput, name send_message_to_thread, namespace codex_app, with a delegation wrapper.
    4. The assistant correctly acknowledged Task B and successfully read the issue's status and comments.
    5. A contextCompaction event appears in that same turn.
    6. Immediately afterward, the assistant announced an investigation of the method from Task A, read repository source, and produced another answer to the already-answered naming question. It did not deliver the requested Task B status/next-action summary.
    7. No new user instruction reinstating Task A appears in that turn. The new final answer exists in the recorded history and matches what the UI displays; this is an actual wrong-task continuation, rather than merely a duplicated rendering of an old message.

    Evidence limits

    The history establishes the ordering and the incorrect continuation. It does not establish the contents of the compaction summary, the full post-compaction model input, whether the delegated request was omitted from that input, or the precise implementation defect. The displayed tool-output record alone does not prove its inference-time role or priority. No controlled reproduction or fix validation has been performed.

    This closely matches this issue's delegated Task B → mid-turn compaction → completed Task A sequence. A regression test should verify that the current delegated assignment remains active and that the final response addresses it, even when an older direct user question has already been answered.

    No original prompts, screenshots, raw logs, project names, issue keys, local paths, or private chat/account identifiers are attached. This same occurrence is also being cross-referenced on #42131; it should not be counted as two incidents.

  8. javadavado-svg commented on Oct 3, 2026

    @javadavado-svg

    Additional Windows occurrence — 3 October 2026. Two existing specialist chats received authorized review requests through cross-task messaging, began the requested work, then reverted to older instructions after recorded mid-turn contextCompaction events. These were existing chats, not newly spawned subagents.

    Observed sequence from task-history inspection:

    • Reviewer A explicitly confirmed authorization and began the requested checks. After compaction it instead said no additional work had been authorized and that it would remain on hold. Affected turn: 07:56:49–08:03:20 UTC.
    • Reviewer B began its review and reported progress. After compaction it returned to an older, unrelated tooling discussion and ended without the active review result. Affected turn: 07:55:54–08:06:03 UTC.

    Those times are turn boundaries, not exact compaction timestamps. No new user stop instruction appeared between compaction and the stale response in either affected turn. Both reviews were completed after manual reminders. This was therefore not simply failure to deliver a request: each receiver acknowledged and started it.

    Evidence limits: this establishes event ordering and wrong-task continuation, not the underlying implementation defect, the complete post-compaction model input, or a model-specific cause. Exact incident app/backend versions and a Feedback ID are not included in this update; the older version in my September report should not be treated as today's version. No raw logs, private task IDs, original review material or project paths are attached.

    This closely matches the cross-task request → work begins → compaction → obsolete instruction sequence in this issue. Related symptoms are also tracked in #42611, #8648 and #16042. These are two incidents, not separate incidents for each linked issue.

    Expected behavior: retain the current authorized request, completed work, remaining work and reporting destination across compaction, while continuing to honor genuinely new stop instructions. The practical impact is silent unfinished reviews: the requesting chat waits while the receiver appears idle or finished, and I have to notice and intervene.

  9. blockjacc commented on Oct 3, 2026

    @blockjacc

    Corroborating compaction-triggered stale-assignment failure on macOS, observed October 4, 2026 (Asia/Manila).

    Environment: Codex workflows in the desktop app; installed ChatGPT host version 26.930.21537, build 12776. The exact embedded Codex component/model version was not collected.

    The coordinator assigned an existing QA thread a current browser acceptance task through send_message_to_thread. The receiving thread acknowledged it and executed the correct task:

    1. Signed into the intended local application.
    2. Opened the existing approved case.
    3. Submitted an explicit current-record read.
    4. Inspected the current-record outcome.
    5. Submitted a bounded recorded-history read.
    6. Inspected that outcome.
    7. The retrieved thread transcript then contains a contextCompaction item.
    8. The next visible assistant final answer was only "Open Surfacing" — a navigation-link response unrelated to completing or reporting the active acceptance task.

    The current turn completed without a reported execution error. No new human instruction canceled or replaced the assignment between the correct browser actions and that final response. The coordinator had to redispatch the current assignment and explicitly instruct the thread to preserve and inspect its completed reads rather than repeat them.

    A separate validation thread in the same workflow also began its current assignment but returned an unrelated old browser-session response; after redirection it completed the actual validation. The user reports this stale-instruction pattern repeatedly after compactions. This has happened multiple times already while working on this ONE project, across established specialist threads; it is not a single isolated occurrence or a comparison between unrelated projects. Repeated coordinator interventions have been necessary to restore the current assignment.

    A subsequent browser continuation was rejected by safety review citing a previous stop instruction despite the currently resumed assignment. This is an additional observed stale-stop symptom; the precise relationship to the compaction/delegation failure needs investigation.

    Impact: unfinished acceptance, specialist threads going idle, repeated manual redispatch, extra time and compute, and risk of repeating already-completed operations. Correct tool execution before compaction does not ensure correct post-compaction reporting or continuation.

    Expected behavior: preserve the latest delegated assignment, its completed operations/results and remaining work through compaction. Do not revive an obsolete link-only/login/stop assignment. Post-compaction reporting must accurately reflect operations already performed.

    This report is intentionally sanitized: no customer information, screenshots, credentials, private project paths, thread identifiers or raw session logs are included. The explicit contextCompaction-to-unrelated-final sequence was observed using the desktop thread-reading tool; the internal replacement history was not inspected.

  10. phoenixweiss commented on Oct 3, 2026

    @phoenixweiss

    Additional macOS reproduction observed on October 4, 2026. This confirms that the failure is still present in a newer Desktop/CLI build.

    Environment:

    • Codex Desktop 26.930.31730, build 12947
    • Bundled codex-cli 0.160.0
    • macOS 26.7 (25G229), arm64
    • Model: GPT-5.6 Sol, high reasoning effort

    Sanitized persisted sequence (UTC):

    22:42:40  a new send_message_to_thread assignment is received
    22:42:47  the receiving agent acknowledges the correct assignment
    22:42:51  it begins a repository check for that assignment
    22:43:53  contextCompaction occurs in the same turn
    22:44:06  the first post-compaction assistant message switches to an
              unrelated, previously handled PDF-signing task
    22:44:11  a second delegation supplies precise data for the current assignment
    22:46:23  the user intervenes after the agent continues the stale task
    

    There was no new user instruction between the correct pre-compaction work and the stale post-compaction continuation. The second delegated update was persisted after compaction, but it still did not restore the current task automatically.

    The receiving agent later acknowledged that it had continued the wrong neighboring context. The current assignment resumed only after the user explicitly told it to reread the transferred task.

    This adds two useful points to the existing report:

    1. The failure remains reproducible with Desktop 26.930.31730 / CLI 0.160.0.
    2. A fresh second delegation after compaction may be insufficient to recover task authority once the stale task has been revived.

    Expected behavior: the latest delegated assignment, completed work, remaining constraints, and subsequent updates must remain authoritative across compaction. If the continuation state is ambiguous, the agent should stop and request clarification before switching objectives or performing tool actions.

    No conversation identifiers, task identifiers, project names, local paths, private prompts, screenshots, or raw logs are included.

  11. bobbyleeweiwei-bobby commented on Oct 8, 2026

    @bobbyleeweiwei-bobby

    Additional Windows reproduction observed on 8 October 2026: the same existing receiving chat lost the current cross-thread task twice after mid-turn compaction.

    Environment captured after the incidents

    • Running desktop package: OpenAI.Codex 26.1002.7124.0 (Windows Store installation; the ChatGPT host process runs from this package).
    • Running bundled executable: codex-cli 0.162.0-alpha.2.
    • Windows 11, 10.0.26300, x64.
    • Model recorded in both affected turns: gpt-6.1-sol, reasoning effort xhigh.

    Sanitized observed sequence (UTC)

    Attempt Turn window Observed outcome
    1 04:05:42–04:11:02 A coordinator used send_message_to_thread to request an already-authorized website implementation task. The receiver acknowledged it and performed startup/source checks. After a recorded mid-turn compaction, it answered an older question about GA4 and Clarity and completed the turn without the implementation deliverable.
    2 04:15:00–04:34:19 The coordinator explicitly restored the current task, explained the previous failure, supplied a working UTF-8 command and required a durable execution checkpoint. The receiver resumed the correct work, edited source files and ran 42 passing tests across 11 test files. At 04:33:24.524 a compacted record was written; the subsequent continuation again answered the old GA4/Clarity question and completed the turn instead of finishing or accurately handing over the implementation.

    Both turns completed with error: null in the task-status API. In the second attempt, 14 modified/new local files remained, while the written checkpoint was still an early startup snapshot. Git HEAD had not advanced and no new production release was recorded. Actual partial progress therefore existed, but the terminal response did not report it or identify the unfinished work.

    The incoming current tasks are persisted as function_call_output records containing a codex_delegation wrapper. For the second compaction, inspection of the visible replacement_history found no such delegated-task tool-output record. The opaque compaction item is not inspectable, so this is not a claim that the active task was entirely absent from the compressed summary, nor proof of the complete root cause.

    A local Python stdout encoding error occurred during the first attempt. That error was explicitly fixed and verified before the second attempt; the repeated task reversion occurred after the receiver had successfully read the same workbook/PDF and completed real code changes and tests. The encoding issue alone therefore does not account for both observed failures.

    Expected behavior

    Preserve the active delegated instruction, unfinished work, successful changes/tests and applicable authorization across compaction. An already-answered historical question should not replace the current task. If execution stops, report the real checkpoint and remaining blockers rather than silently closing with an unrelated answer.

    Mitigation being used

    The user has requested that execution continue in the coordinator chat under a direct human instruction. Existing changes and test evidence are being preserved and reviewed before resuming; the affected chat is retained for provenance.

    This is two observed failures in one long-lived chat, not a measured overall failure rate or evidence that every chat is corrupted. No passwords, account data, project identifiers, native session IDs, full prompts, raw logs, hidden reasoning or opaque summary contents are included here.

  12. realgyeongminnoh commented on Oct 13, 2026

    @realgyeongminnoh

    Additional Windows occurrence on 2026-10-12 (Asia/Seoul; UTC timestamps below), checked against saved events by the affected chat and a separate reviewing chat. This is one observed occurrence, not a controlled reproduction or measured failure rate.

    Environment

    • Incident turn metadata: gpt-6-astra, reasoning effort ultra, both before and after compaction.
    • Installed versions checked on 2026-10-13: desktop package OpenAI.Codex 26.1007.2314.0; bundled codex-cli 0.162.0-alpha.17.2; Windows 11 x64, build 10.0.26300.
    • Those installed versions are investigation-time observations, not independently verified executable versions for the incident.

    Sanitized sequence from the same turn

    Task A was an already-answered infrastructure-status question. Task B was a new, unrelated, advice-only instructions review sent by another existing chat.

    • 2026-10-11T22:23:00.635Z: Task B arrived as function_call_output, namespace codex_app, name send_message_to_thread, containing a readable delegation wrapper.
    • 2026-10-11T22:23:06.248Z: receiver correctly acknowledged B and then read the relevant instructions.
    • 2026-10-11T22:24:46.442Z: a compacted record appeared.
    • 2026-10-11T22:24:55.422Z: receiver announced Task A instead, then used a subagent and executed a fresh read-only remote status query for A.
    • 2026-10-11T22:26:29.265Z: receiver returned another answer to A. The requested B consultation was not delivered.

    There was no new user instruction reinstating A. This was new wrong-task execution, not a duplicate rendering of the previous answer. No file or server-configuration changes were observed.

    Evidence limits

    The replacement history contained 47 user messages, three developer messages, and one opaque encrypted compaction item. The old A question remained explicitly present; B was absent as a standalone readable item. The compacted resume metadata still identified the turn trigger as app_tool_send_message.

    The opaque item's contents are unknown, so this does not prove B was absent from the compressed state or establish the underlying defect. The latest authorized assignment, its scope and provenance should survive compaction; an already-completed human question should not silently become current again.

    No raw transcripts, original prompts, private project paths, chat identifiers, credentials, or opaque payloads are included.

  13. RongNianXin commented on Oct 14, 2026

    @RongNianXin

    Additional Windows observation: the initial summary preserved the delegated task, but recovery still revived a completed instruction

    This adds a distinction to the existing report, rather than reporting a controlled reproduction or a confirmed root cause.

    Environment and scope

    • Codex Desktop on Windows. The saved incident session metadata reports 0.162.0-alpha.17.2; the exact running Desktop package/app-server binary and effective retention feature state were not independently established for that turn.
    • The incident used a configured API-provider integration. The provider label alone does not establish the actual inference backend or which component caused the failure.
    • The observations below come from one saved receiving-thread event sequence, independently inspected after the incident. No artificial compaction or paid replay was performed.

    Observed sequence

    Task A was a local instruction-refresh request. Task B was a subsequently authorized, bounded implementation assignment delivered by another existing chat.

    1. A had already produced a successful final response and a task-completion event.
    2. B arrived through send_message_to_thread, persisted as a named function_call_output. The receiver read the source human authorization, acknowledged B, recorded it as started with an absolute deadline, and sent a startup receipt.
    3. The first readable compaction summary correctly identified B as active, explicitly distinguished it from another instruction refresh, and preserved its scope, unfinished work and deadline.
    4. The corresponding visible replacement history retained the earlier A user message but did not retain B's original tool-delivered request as a standalone item. Side metadata still referenced the delegated delivery. This is asymmetric visible retention, not proof that B disappeared from all compressed state.
    5. Recovery reread an older handoff snapshot and announced that it would only refresh instructions. A subsequent readable summary then encoded that incorrect task selection.
    6. Even after reading the started-assignment record and deadline again, the receiver persisted the obsolete A interpretation and finished with A's response format, saying there was no unfinished work while failing to account for B.

    No new direct user instruction reinstated A between B's arrival and this incorrect completion. The delivery succeeded and the receiver initially understood the current task; this is not merely a missing-message or empty-turn incident.

    What this establishes, and what it does not

    • The observable failure is post-compaction selection of a completed request over a current, source-verified assignment, followed by inconsistent state/reporting.
    • The first summary preserved B correctly. Therefore, "the first summary entirely forgot the task" is not a sufficient explanation for this occurrence.
    • Visible replacement-history asymmetry is a plausible contributing condition, not an isolated or proven cause. We did not capture the complete post-compaction inference request, inspect opaque compaction data, or prove a specific client, model or provider defect.
    • We inspected actual pre-incident presentation of relevant recovery rules. This does not prove that every instruction file was fully understood, or that a project-level refresh can enforce Desktop recovery behavior.

    Related upstream work and remaining question

    PR #52937, merged on October 10, is directly relevant: it retains qualifying standalone tool outputs across compaction and includes a send_message_to_thread compaction/cold-resume scenario. The implementation requires metadata.client_authored=true, a present name, an absent call_id, and the enabled retain_client_tool_outputs feature. At the merge revision, that feature was under development and disabled by default. Retention also shares a bounded token budget; it is not an unconditional guarantee that all such outputs survive. The merge does not establish inclusion or activation in the Desktop binary used here, nor coverage of this particular incoming delivery path.

    Could maintainers clarify how Desktop marks and preserves delegated instructions on this path, and which build/feature configuration includes this behavior? A regression should also cover a correct initial summary followed by competing older user instructions and snapshots, not only whether the raw delegated text survives.

    Local mitigation and acceptance limits

    Our project now requires reconciliation of the active request/event, processing slot, terminal state, pending delivery and original deadline before restoring a reading cursor. Within the activity-bound local reader path, ownership and snapshot checks reject terminal-refresh rereads and delivery bound to a different request. These checks depend on the supplied record and do not independently authenticate the event or enforce every tool path.

    These are project-level checks, not a Desktop patch. Local synthetic/CLI regressions pass, but an agent can bypass this reader and the host is not globally intercepted. A subsequent bounded message test had no compaction; it does not demonstrate a real post-compaction fix. Desktop retention-path verification and a genuine post-compaction acceptance test remain outstanding.

    Expected behavior: preserve and reconcile the current authenticated assignment, completed actions, remaining deliverable, reporting destination, deadline and genuinely new stop instructions. Completed historical requests must not become current solely because they remain visible. If recovery is ambiguous, report the specific conflict instead of silently completing the wrong task.

    No original prompts, screenshots, raw transcripts, hidden reasoning, opaque payloads, private identifiers, local paths, business details or identifying hashes are attached.

  14. phoenixweiss commented on Oct 18, 2026

    @phoenixweiss

    Additional macOS occurrence observed on October 18, 2026. This adds a provenance-and-recovery variant to the delegated-task replay described here.

    Environment checked after the incident

    • ChatGPT/Codex Desktop host: 26.1013.40934, build 20770
    • Bundled codex-cli 0.163.0-alpha.10.2
    • macOS 26.7.1 (25G241), arm64
    • These versions were read after the incident and are not asserted as a verified executable history for the failed turn. The model and reasoning setting were not independently captured.

    Sanitized observed sequence

    1. A user gave a current instruction B in a coordinating chat and approved its next implementation step.
    2. The coordinator delivered B to an existing receiving chat through cross-task delegation. The receiver acknowledged B, investigated it, and produced the requested implementation contract.
    3. A contextCompaction event occurred in that receiving turn.
    4. Immediately afterward, the receiver revived an older, already-handled user instruction A. It sent A back to the coordinator as the current direct user instruction, stopped B, and treated previously granted approval for B as unavailable.
    5. The coordinator supplied exact chronological evidence of the newer user instruction B and asked the receiver to reread the coordinating chat. The receiver initially rejected that correction, saying its latest direct user message was still A and that another chat could not cancel it.
    6. After a fresh explicit correction and reread of the coordinating chat, the receiver acknowledged that A was stale and resumed B.

    No new user message in the receiving chat reinstated A between compaction and the replay. The first stale-task transition is directly adjacent to the recorded compaction event. This establishes the event ordering, not the complete post-compaction model input or the underlying implementation defect.

    Additional impact

    This occurrence propagated false provenance across chats: a historical instruction was described to the coordinator as a fresh/current direct user command. The receiver then defended that provenance even when given identifiers and timestamps for a newer human instruction. Recovery required another explicit correction plus rereading the source chat.

    The result was interrupted authorized work, redundant cross-thread messages, repeated authorization checks, and additional time/compute. No production or third-party mutation occurred in this occurrence.

    Expected behavior

    • Preserve current-instruction chronology, handled/superseded state, and original provenance across compaction.
    • A retained historical user message must not become current merely because newer work arrived through delegated/tool-delivery state.
    • When a coordinator supplies verifiable evidence of a newer human instruction, rereading the source chat should reconcile the active task instead of preserving the stale one.
    • If authority remains ambiguous, stop before tool side effects and report the conflict explicitly.

    Suggested regression: handled direct instruction A → newer human-approved B → B delivered through send_message_to_thread and acknowledged/worked → mid-turn compaction → verify B remains current. Then provide source-chat chronology for B and verify that the receiver cannot continue to classify A as the latest instruction.

    No conversation, turn or message identifiers, original prompts, project names, local paths, private business details, screenshots, raw logs or opaque compaction contents are included.

  15. kilalice commented on Oct 21, 2026

    @kilalice

    Additional occurrence observed on 2026-10-21 (Asia/Tokyo) in Codex Desktop on Windows.

    Observed sequence

    1. A human requested a concrete local-model evaluation in a coordinating chat, including a preferred inference backend, a temporary agent-provider setting, and conditional adoption if speed and conversational quality met the stated requirements.
    2. The coordinator forwarded that authorized task through send_message_to_thread to the existing worker chat.
    3. The worker acknowledged the correct evaluation and provider-configuration task in its first commentary, read project state, and called read_thread to inspect the source instructions.
    4. A contextCompaction item then appeared in the same receiving turn.
    5. The next commentary changed the objective to explaining whether the existing model was oversized for the application.
    6. The worker read additional documentation for that different question and ended with a conceptual answer about model size and application roles. It did not deliver the requested evaluation or provider configuration.

    The coordinator subsequently inspected the completed turn using read_thread. The acknowledged assignment, compaction marker, changed commentary, and unrelated final answer were all visible in that one turn. No new human instruction changing the objective was visible between those events in the inspected turn.

    Expected behavior

    The acknowledged, current delegated assignment and its remaining work should survive compaction. If execution is blocked, report that specific blocker; do not complete the turn by answering a different historical/conceptual question.

    Impact and evidence limits

    This caused an authorized task to stop after intake and unrelated investigation, requiring human detection and corrective coordination. The initial acknowledgment looked like progress, but was not evidence of execution.

    This is one observed incident, not a deterministic fresh-session reproduction. The ordering is confirmed in the returned transcript; the opaque compaction contents, complete post-compaction model input, and internal root cause were not inspected. It may be a task-state/provenance, compaction, or model-continuation issue; this report does not establish which component is responsible.

    Platform: Windows desktop. Exact installed app build, bundled CLI version, and selected worker model were not independently captured for this occurrence.

    This sanitized report was explicitly requested by the affected user. It excludes original prompts, project names, local paths, private thread/turn identifiers, account information, credentials, raw logs, and full conversation transcripts.

  16. kkonstvol-lab commented on Oct 21, 2026

    @kkonstvol-lab

    Additional macOS evidence: Desktop delivery omits the available retention annotation

    This adds a client-path observation to the failure described here. It does not claim a new post-update compaction reproduction or establish the complete root cause.

    Previously observed failure

    In existing receiving chats, the recorded sequence was:

    1. A completed historical instruction A remained in the conversation.
    2. A newer authorized assignment B arrived through send_message_to_thread.
    3. The receiver acknowledged B and began the requested work.
    4. Natural mid-turn compaction occurred.
    5. The continuation reverted to A or stopped without completing B.

    Restoring or rereading project status did not by itself reliably restore the current assignment. Project state and the latest active instruction are separate recovery requirements.

    The delegated request was absent as a standalone item from inspected replacement history. Opaque compaction contents and the complete subsequent inference request were not available, so this does not prove B was absent from every compressed representation.

    Current environment, inspected after an update

    • Desktop host: 26.1016.51333, build 21161
    • Bundled backend: codex-cli 0.163.0-alpha.11
    • macOS 26.5, arm64

    The executable owning the inspected conversations was verified against the current bundled executable. These versions describe today's inspection, not a verified executable history for all earlier failures.

    No artificial compaction, new replay, or post-update compaction reproduction was performed.

    New client-path observation

    Read-only inspection of the installed Desktop delivery path found that the builder used for send_message_to_thread constructs a turn/start tool output equivalent to this sanitized shape:

    {
      "input": [],
      "toolOutput": {
        "name": "send_message_to_thread",
        "namespace": "codex_app",
        "output": "<delegated assignment>"
      }
    }

    The inspected builder and forwarding path do not add retain.

    A fresh delivery on this build was persisted as a named standalone function-call output, with no call ID and with client_authored: false. That confirms the delivery representation; it is not evidence of another post-update compaction failure.

    The matching public backend source already provides the annotation:

    A separate feature listing from that bundled executable reported retain_client_tool_outputs=false and context_management=false. This is a CLI baseline observation, not proof of the effective configuration of every Desktop thread.

    Together, these findings identify an apparent Desktop integration gap with the retention mechanism discussed in PR #52937. They do not establish that the omission alone causes wrong-task continuation. Retaining raw text also cannot guarantee correct task selection.

    Requested clarification and regression coverage

    Could maintainers confirm the supported Desktop path and activation requirements for retaining an authenticated delegated assignment across compaction?

    Please preserve tool/source attribution rather than promote arbitrary tool output to human authority or retain every notification indiscriminately. The relevant semantics include the active assignment, scope, remaining work, completed actions, and whether earlier instructions are completed or superseded.

    A regression should cover completed A → accepted delegated B → natural mid-turn compaction → continuation of B, while separately verifying that a genuinely new stop instruction is honored. If recovery is ambiguous, an explicit conflict is preferable to silently completing an obsolete task.

    No original prompts, task contents, private identifiers, local paths, configuration dumps, raw logs, attachments, or proprietary application code are included.

  17. rossky094-hub commented on Oct 23, 2026

    @rossky094-hub

    Four additional macOS occurrences: an accepted maintenance assignment becomes an already-answered overview after mid-turn compaction

    I am adding corroborating evidence to this existing issue rather than opening a duplicate. The affected user explicitly requested this sanitized report.

    Environment and scope

    • Codex desktop on macOS, arm64.
    • Installed desktop inspected after the latest occurrence: 26.1016.61520, build 21421; bundled executable: codex-cli 0.163.0-alpha.11.1; macOS 27.0.1. These are inspection-time versions, not a verified executable history for every earlier occurrence.
    • The receiving turns' persisted turn_context records name gpt-6.1-sol. This is recorded configuration, not independently verified server-side model routing.
    • A local HTTP/WebSocket transport bridge is configured. Its inspected implementation pipes request/response bodies without JSON rewriting and records transport metadata only. No direct-versus-bridge model comparison was performed; this environment detail should not be silently excluded from diagnosis.

    Observed sequence

    An older direct human question A asked for an overview of a library's value. A had already received a full answer. Subsequently, another chat delivered specific maintenance assignments B through send_message_to_thread.

    In four inspected receiving turns, each assignment was acknowledged correctly and relevant work began. A natural mid-turn compaction then occurred. In the same turn, the continuation changed to answering A, without a new instruction requesting that overview.

    Occurrence Work immediately before compaction, generalized Final answer after compaction
    1 Incremental-state implementation Repeated library overview, about 72 seconds later
    2 Repeated-traversal performance repair Repeated library overview, about 73 seconds later
    3 Dependency/cache API implementation and packaging Repeated library overview, about 133 seconds later
    4 Bounded diagnosis of library/application dependency ownership Repeated library overview, about 77 seconds later

    Occurrences 1–3 were on October 21; occurrence 4 was on October 23, 2026, in the user's local timezone. These are incident observations, not four deterministic fresh-session reproductions.

    For occurrence 4, using receipt of B as t=0:

    t+0s    Named send_message_to_thread output delivers current assignment B.
    t+32s   Assistant correctly describes B and then reads relevant implementation/specification material.
    t+226s  Automatic compaction is persisted.
            The same turn ID and app_tool_send_message trigger remain recorded.
    t+236s  First visible commentary after compaction switches to answering old question A.
            Memory retrieval and old delivery-document reads follow that switch.
    t+303s  Final response answers A instead of delivering the requested diagnosis B.
    

    In occurrence 3, code changes and a successful 48-test run are visible before compaction. Therefore the issue is not simply failure to receive or start B. Earlier corrective follow-ups restored the intended work temporarily, but did not prevent recurrence at a later compaction. Continuity and final-scope instructions had already been loaded; adding another reminder has not been shown to fix this behavior.

    What the local records show

    • Incoming B is a named standalone function_call_output, containing a codex_delegation envelope with the exact assignment in input.
    • Each inspected replacement_history has 75 items: 69 user messages, four developer messages, one developer additional_tools item, and one opaque compaction item. There are no standalone assistant messages or function-call outputs in that explicit list.
    • The last explicit human business question in that list is still A. Environment notices can follow it; this is not a claim that A is literally the final item.
    • Other retained state is not empty. It includes the correct recent acknowledgment of B and the original turn attribution.
    • The inspected retained_context.sender_deliveries contains a partial source-chat user-history package, not a verbatim copy of the current specific delegated input. Those two forms of context should not be treated as interchangeable.
    • The first visible task switch precedes the subsequent memory lookup, so the lookup cannot establish the initial cause.

    The opaque compaction item was not decoded or replayed. Absence from the explicit replacement list does not prove B was absent from the compressed representation or the complete model input. These observations establish the recovery failure and its timing; they do not identify whether compaction serialization, client restoration, or model task selection is the sole underlying cause.

    Expected behavior and requested investigation

    Please preserve the current authenticated assignment, source attribution, active/handled state, latest corrections, remaining work, and applicable boundaries across compaction. An already-answered question must not become current solely because its original user-role text remains explicit while the current task arrived as tool-delivered input.

    The first resumed model request is a useful diagnostic boundary: inspect the public task text, item roles/order, active-task binding, and retention annotations, while keeping opaque model state private. Please clarify whether the available TurnToolOutput.retain mechanism and its feature activation are actually connected to desktop send_message_to_thread; that integration is discussed in the preceding comment. We have not independently verified that builder or that omission as the cause in this installation.

    A regression should cover: answered A → authorized B delivered and correctly worked on → mid-turn compaction → first continuation still works on B → final result satisfies B. Separately verify that a genuinely newer correction, stop, or permission boundary is honored, and that uncertain external effects are not automatically replayed. Delivery acknowledgment, a passing local test, or an accurate overview of A cannot establish completion of B.

    No original prompts, project/customer/book/character names, usernames, local paths, private chat/turn/message identifiers, credentials, screenshots, raw transcripts, attachments, or opaque compaction contents are included. All task descriptions above are generalized.

  18. bfpbr5 commented on Oct 27, 2026

    @bfpbr5

    Reproduction and a root-cause candidate: where the initial context is re-inserted after compaction

    Observed on codex-cli 0.163.0-alpha.10.2. The code discussed below is unchanged on rust-v0.164.0, rust-v0.166.0-alpha.1 and main (2cab11c).

    What the first post-compaction request looks like. This was captured after compacting a thread whose current task had arrived through send_message_to_thread:

    developer  base instructions
    developer  skills / permissions / multi-agent instructions
    user       AGENTS.md + <environment_context>
    user       <old, already-answered user message>
    user       <compaction summary>
    

    The delegated task itself (a function_call_output without call_id) is not in the replacement history. Only the summary mentions it.

    Why the old message looks current. insert_initial_context_before_last_real_user_or_summary (codex-rs/core/src/compact.rs, L640–698 on 0.163.0-alpha.10.2, L646 on main) puts the re-rendered initial context immediately before the last real user message. This is correct when that message is the request being handled. In a turn triggered by send_message_to_thread (or by a heartbeat or goal continuation), the last real user message is an old one that has already been answered. After compaction, the model therefore sees exactly the shape of a fresh turn: developer instructions, then AGENTS/environment, then the old question. The summary that follows does not reliably override this. Only visible user messages are retained, so the delegated task cannot take that position either.

    This rule is not limited to one compaction mode. The same function is used when installing a remote (v2) compaction result: compact_remote_v2_installation.rs goes through build_compaction_replacement_history, and session/mod.rs (~L4469 on main) calls the function directly. Remote v2 is the default for the OpenAI provider.

    #52937 retains client-marked tool outputs across compaction. However, it sits behind the disabled-by-default retain_client_tool_outputs flag, and the desktop app does not currently send retain: true with send_message_to_thread deliveries, so this failure still occurs.

    Single-variable experiment. I replayed a real failing compaction: about 120 retained items, with a summary that correctly named the delegated task as current. I changed one variable at a time, with 3 runs per cell, on two models from different families. A run passes if the first post-compaction action continues the delegated task.

    Variant Model A Model B
    Unmodified layout 0/3 0/3
    Move only the last old user message in front of the context block, so the summary directly follows the context 3/3 3/3
    Move the whole context block to the front 3/3 –
    Merge the old user messages into one "pre-compaction history" message 3/3 –
    Text-only: label old messages as handled and add a reminder after the summary 2/3 –
    Text-only: reword the summary prefix as "your own handoff record" 0/3 –

    Changes to the position fix it; text-only nudges do not reliably help. This also explains the workaround described in this issue. When the task is delivered as a first-class user message, it becomes the last real user message, and the context lands in front of the right item.

    Possible fix. When the active turn was not started by a user message (app_tool_send_message, heartbeat, goal), or when the last real user message predates the active turn, insert the initial context immediately before the summary/compaction item instead of before the last real user message. Alternatively, retain the triggering function_call_output and use it as the insertion anchor.

    Related: #42611, #47592, #45894, #27731, #8648.

  19. phoenixweiss commented on Oct 28, 2026

    @phoenixweiss

    Additional macOS occurrence observed on October 28, 2026. This provides a clean within-turn sequence of correct delegated-task work followed by an unrelated completed-task replay immediately after compaction, on a newer installed Desktop/CLI version.

    Environment checked after the incident

    • ChatGPT/Codex Desktop host: 26.1023.50603, build 22391
    • Bundled codex-cli 0.165.0-alpha.1.2
    • macOS 26.7.1 (25G241), arm64
    • These versions were read after the occurrence and are not asserted as an independently verified executable history for the failed turn. The model and reasoning setting were not captured.

    Sanitized observed sequence

    1. A coordinator delivered a new design assignment B through cross-task delegation to an existing receiving chat. B requested a cohesive set of layouts for a new content feature: a main-screen entry point, listing, article, filtering and editor states.
    2. The receiver correctly acknowledged B, read its plan, inspected the existing public and administrative interfaces, and described the intended design direction.
    3. A contextCompaction event was recorded in the same turn.
    4. The first assistant message after compaction switched to an older, unrelated instruction A about changing the background behind characters in a previously completed support mockup.
    5. The receiver searched the old support materials, opened a previously saved support image, and ended the turn with an answer and image for A. It did not deliver B.
    6. No new user message reinstated A between compaction and that response.
    7. After the user said the fresh instruction had again been ignored, the receiver explicitly acknowledged that it had picked up the old support remark and shown the previous mockup instead of continuing B, then returned to B.

    This establishes the event ordering and the wrong-task continuation immediately across the compaction boundary. It does not establish the exact contents of the compaction summary, the complete post-compaction model input, or the underlying implementation defect.

    Impact

    The active turn completed with an unrelated stale result, resurfaced an old private image in the chat, required manual user correction, and consumed additional time and compute. No product, production or third-party mutation resulted from this replay.

    Expected behavior

    • Preserve the current delegated assignment and the handled/superseded state of older requests across compaction.
    • Do not let an older retained user message regain authority merely because the current task arrived through delegated/tool-delivery state.
    • If active-task authority cannot be reconstructed, report the conflict before opening or acting on unrelated historical material.

    Suggested regression: completed user task A → new delegated task B → receiver acknowledges and begins B → mid-turn compaction → verify the first continuation remains on B and cannot finish the turn with A's result.

    No conversation, turn or message identifiers, original prompts, project names, user data, local paths, private product screenshots, raw logs or opaque compaction contents are included.

  20. heyxjacob commented on Nov 5, 2026

    @heyxjacob

    Additional compatibility evidence for #42695; this is not a fresh end-to-end reproduction or a claim about the incident's complete root cause.

    Environment checked on 2026-11-05: macOS Desktop 26.1029.61003 (build 24614), bundled codex 0.166.0-alpha.6. The official updater reports up_to_date for the configured prod channel.

    PR #52937 provides conditional retention support for explicitly retained, named function_call_output items without call_id. Static inspection of the installed Desktop turnToolOutput adapter found name=send_message_to_thread, namespace=codex_app, and output, but no retain=true. The bundled feature listing reports retain_client_tool_outputs=false. The effective feature value in the active Desktop server remains unknown because in-memory remote overrides are possible; no live server was modified.

    This suggests the inspected adapter shape cannot benefit from #52937 merely by upgrading the bundled backend or enabling its flag. It does not establish which runtime branch was used in an earlier failure, or that this is the full cause of #42695.

    Could maintainers confirm the supported Desktop path/build for retaining cross-thread task instructions, and cover it with a Desktop-to-app-server regression? Useful acceptance would preserve the latest delegated instruction and sender attribution through compaction and cold resume, without reviving an obsolete task or contradicting actions already completed. An alternative semantic implementation would also be acceptable.

    No prompts, business data, chat identifiers, local paths, raw logs, or proprietary code excerpts are included. No production task was replayed and no signed application file was patched.

  21. masonturveysonicdiy commented on Nov 11, 2026

    @masonturveysonicdiy

    Additional observed incident on 2026-11-11, consistent with this issue: after mid-turn compaction, a persistent Codex Desktop chat abandoned acknowledged implementation work and answered a direct human question from seven days earlier. The distinctive evidence is that a SessionStart recovery hook successfully delivered the current assignment after compaction, yet the continuation still reverted.

    Sanitized timeline (UTC):

    • 2026-11-04 19:50:18.289: the historical direct user question was submitted.
    • 2026-11-11 18:08:31.193: the assistant reported progress on the current authorized implementation and named its next implementation step.
    • 18:35:19.349: the rollout recorded compaction. Its replacement history contained 98 items: 94 user-role messages, three developer-role messages, and one opaque compaction item. The last retained user-role message was the November 4 question. The current assignment's identifier was absent from those retained plaintext messages.
    • 18:35:19.442: the trusted native SessionStart hook delivered developer context containing the current ACTIVE assignment and NEXT actions. Both are present in the recorded model-facing message, despite truncation elsewhere in that message. Current coordination deliveries were also retained separately.
    • 18:35:25.354: the first visible assistant continuation switched to the historical configuration question.
    • 18:35:28.117: its first tool action searched the checkpoint for that old topic. It subsequently finalized an unrelated answer, and the coordinator had to explicitly restore the current assignment.

    Environment: Codex Desktop with a local Linux execution host; the incident turn records gpt-6-astra at medium effort. Session-creation metadata records cli_version 0.162.0-alpha.17.2, but this is not asserted as the executable version at the later incident. Exact Desktop/app-server build at the incident is unverified.

    This establishes an observed wrong-task continuation across compaction, not a deterministic reproduction or a proven internal root cause. We did not inspect the opaque compaction item, so we cannot establish that the active task was absent from it. Recovery wording referring to the "latest user message" may have contributed; that is also unproven.

    Expected regression coverage: completed human request A -> newer human-authorized delegated assignment B -> B acknowledged and partly implemented -> compaction -> current checkpoint injected -> continue B. A genuinely newer human redirect must still govern. Historical user-message position should not reactivate completed work or erase newer authorized work.

    We are clarifying our recovery wording as a local mitigation, not claiming a product fix. Original prompts, product names, chat identifiers, local paths, raw logs and private source are omitted.

  22. masonturveysonicdiy commented on Nov 11, 2026

    @masonturveysonicdiy

    Follow-up to #42695 (comment): the same chat reverted again during its next implementation turn on 2026-11-11, after our recovery-wording mitigation was in use.

    Verified sequence (UTC):

    • The receiver resumed the current authorized implementation and made source changes, including compiler-input export and generated-source receipts.
    • 19:36:39.426: another compaction was recorded. The replacement history again ended with the same direct human question originally submitted on November 4.
    • 19:36:39.515: the actual model-facing SessionStart developer message identified the revised instruction source. It contained the active assignment and the new wording explicitly distinguishing conversation chronology from the last retained user-role message. The instruction that this position does not reactivate a completed task survived delivery.
    • 19:36:43.420: the first visible continuation switched to the historical configuration question.
    • 19:37:01.025: the assistant finalized an answer about that old question. The turn then completed, leaving the current implementation unfinished. The coordinator explicitly resumed the authorized work while preserving its edits.

    No new direct human redirect appears in the recorded turn. The hook message was truncated elsewhere: its detailed NEXT section exists in the full spill file but not in the delivered preview. The active assignment and revised chronology guidance did survive, so truncation remains a possible contributing factor rather than a proven explanation.

    The incident turn again records gpt-6-astra at medium effort. This follow-up is based on the actual delivered context and continuation, not merely the presence of new guidance in a file. The native hook ran, and its revised chronology guidance was visible; the wording mitigation did not prevent this recurrence.

    This strengthens the evidence for a task-continuity failure across compaction, but does not isolate whether the defect is in history reconstruction, compressed-summary semantics, coordination-message treatment or model prioritization. The opaque compaction item was not inspected. The two local synthetic continuation checks that previously passed were insufficient to predict this real continuation.

    Please include this case in the regression coverage requested above: current authorized work must survive compaction even when a much older direct human question remains the final retained user-role message. Preserve genuinely new human redirects and sender attribution.

    No original prompts, private source, product names, local paths or chat identifiers are included.

  23. javadavado-svg commented on Nov 12, 2026

    @javadavado-svg

    Adding monitored Windows Codex Desktop observations from several longstanding specialist chats—not newly created agents.

    Between November 5–11, 2026 (Bangkok time), our monitoring task recorded:

    Chat Stale-response episodes Work stopped before completion/delivery
    Documentation validation 7 3
    Board design 1 2
    Content creation 1 1
    Total 9 6

    Five stopped-work episodes also produced stale responses, so these columns overlap. Including one separately classified potential non-progress episode in another longstanding chat, there were 11 distinct episodes across four chats. These are episodes, not counts of compaction markers. They were associated with compaction; we have not established causation or a shared internal root cause.

    We took a different mitigation approach in the documentation-validation chat: a persistent on-disk request queue, reinforced through AGENTS.md, with:

    • Stable request IDs, scope, status, evidence, and exact next unfinished steps.
    • Recovery instructions to reconcile the queue with newer instructions after compaction.
    • Separate tracking of completed work and successful result delivery.
    • Checks against answering an already-completed request instead of the current one.
    • A before-idle check to continue authorized pending work.

    These are instruction-based safeguards, not a native post-compaction hook. They appeared helpful operationally but have not reliably prevented stale responses or unfinished work being left pending. We cannot claim controlled before/after effectiveness.

    The reports here that active-task recovery context was successfully delivered yet stale work still resumed are particularly concerning. Our experience likewise suggests that keeping a checkpoint and adding recovery instructions is not, by itself, a dependable solution.

    Please include persistent, long-running chats with delegated requests in regression coverage: acknowledge and begin current work, compact, recover the checkpoint, then verify that the chat continues the correct request and delivers its result without reviving completed historical instructions.

  24. masonturveysonicdiy commented on Nov 19, 2026

    @masonturveysonicdiy

    Another confirmed recurrence on November 19, 2026, following the November 11 observations above. This time the stale task propagated into a second chat and was saved as current checkpoint state.

    Environment: Codex Desktop on Linux. The affected turn records gpt-6.1-sol with high reasoning effort. The current desktop/bundled-CLI build was not independently established, so I am not attributing this to a specific build.

    Sanitized timeline, UTC:

    • November 11, 15:54:54.188: the human reported an updater delay/retry symptom.
    • By November 19, the receiving UI specialist was doing a different, current delegated implementation and source-integration task.
    • November 19, 17:27:24.495: automatic mid-turn compaction. The inspectable replacement history retained the eight-day-old updater message as its last user-role message.
    • 17:27:24.570: the native recovery hook delivered the assigned role, checkpoint and chronology instructions. The visible delivered excerpt included the active current task and guidance not to reactivate historical requests. Some checkpoint detail was truncated.
    • 17:27:29.436: five seconds after compaction, the first assistant continuation reopened the old updater topic as if newly requested.
    • 17:27:44.249: it asked the human a fresh clarification question, then dispatched a second specialist to investigate and saved the historical symptom under a new/current task heading in its checkpoint.

    The original user-message timestamp and the retained compaction record were checked directly. No new human message reinstating the updater task was found. This was more than stale wording: it caused diagnostic/tool work, cross-chat dispatch, an unnecessary user question and incorrect durable task state.

    Recovery is now verified: the coordinator corrected the chronology; both chats stopped only the replay-triggered investigation; the clarification wait was withdrawn; and the UI specialist continued its actual integration task and verified its current receipt. No source/runtime mutation was reported from the updater detour. Its checkpoint was also reduced from about 18.5K to 2.8K characters, putting the current next action first; the full locally generated recovery output is now about 8.2K characters. That is a mitigation, not proof of a native compaction fix.

    The opaque compaction item was not inspected. These observations do not isolate history reconstruction, compressed-summary semantics, coordination-message treatment or model prioritization as the root cause. Truncation is a possible contributor, but current-task and chronology guidance were visibly delivered.

    Please extend regression coverage to detect downstream dispatch and checkpoint contamination: after genuine mid-turn compaction, an older retained user message must not become a new task, clarification request, delegated investigation or current checkpoint objective. Genuinely newer human redirects must still take precedence.

    Private prompts, product/source details, local paths, raw logs and chat identifiers are intentionally omitted.

  25. masonturveysonicdiy commented on Nov 20, 2026

    @masonturveysonicdiy

    November 20 recurrence in the same Linux Codex Desktop chat as yesterday’s report, now on gpt-6.2-sol with high reasoning effort.

    At 17:30:27 UTC the chat received a delegated UI reconnect task and began implementing it. At 17:39:47.392 UTC it compacted mid-turn. The last user-role message in the inspectable replacement history was an unrelated support question originally sent November 11. No new human message had reopened it. 2.395 seconds later, the first assistant response began investigating that question. The chat searched source, inspected a deployed web bundle, and at 17:41:11 asked the human for clarification. It also continued parts of the reconnect work. At 17:42:51 the human explicitly identified the question as obsolete. The assistant then returned to the reconnect task.

    One distinction from yesterday: the recovery hook delivered a chronology warning, but its visible checkpoint named an earlier third assignment. Yesterday’s specific closure of the support question was absent from the visible excerpt. The trace establishes the replay and the extra work. It does not establish which part of the recovery path caused them.

    A regression test should cover this three-task sequence and check the agent’s first action, tool calls, and clarification requests after compaction. Eventual progress on the correct task alone would miss this failure.

  26. masonturveysonicdiy commented on Nov 20, 2026

    @masonturveysonicdiy

    A different receiving chat from the previous report showed the same compaction issue on November 20, 2026. This was Codex Desktop on Linux with gpt-6.2-astra. In this case the user-facing status drifted while the tools continued the current assignment.

    The last free-form message typed directly into the receiving chat was a November 18 request to fix a clock. That work was complete. The user later answered two questions in that chat. The last answer, at 20:31 UTC on November 20, specified timing for a website update. The question itself mentioned that the clock fix was already live. All 15 incoming work messages after that answer through 22:01 UTC were handoffs from other chats.

    Compaction (UTC) First assistant update afterward
    20:22:06 5.5 seconds later, the update led with the completed clock fix again, then described the current website work.
    21:56:52 4.2 seconds later, the update said it would check the website Map build and that the clock fix was already live. Immediately before compaction it had correctly reported two failing tests for a different release involving saved markers. Subsequent tools kept checking that marker release.

    In the second event, the readable replacement history contained the old clock request and the later timing answer as separate user messages. The newer delegated assignment did not appear as a standalone handoff there. The compaction item was encrypted and the record also contained separate delivery metadata, so this trace cannot establish what the summary contained or how the model weighted it. We observed stale commentary; we saw no repeat clock deployment in the sampled interval.

    A regression test could complete a direct request A, deliver a different authorized task B via send_message_to_thread, establish a concrete test result for B, then compact mid-turn. Check both the first user-visible status and the next tool action: each should continue B and reflect its test result. Checking tool actions alone would have missed this occurrence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbugSomething isn't workingcontextIssues related to context management (including compaction)sessionIssues involving session (thread) management, resuming, forking, naming, archiving

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions