Repository navigation
Description
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:
- A thread previously completed Task A.
- Another thread delivered Task B through
send_message_to_thread. - The receiving agent acknowledged Task B and performed several authorized actions.
- Automatic context compaction occurred before Task B's final reporting was complete.
- Without a new instruction reinstating Task A, the agent resumed following Task A.
- 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_outputassociated withsend_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:
- Restore
send_message_to_threaddelivery as a first-class user message in the receiving thread, while keeping sender/source attribution in separate metadata; or - 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
- Goal mode replays the last manual steer on later continuation turns #27894: previously handled instructions becoming actionable again after compaction.
- Context compactization forgets current mission #11054: compaction causing the agent to return to earlier tasks.
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
github-actions commentedon Sep 4, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
345180376-web commentedon Sep 6, 2026
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
26.901.51231codex-cli 0.153.4gpt-6-astra / xhigh; service tier not recorded.Observed sequence
The task descriptions below are sanitized paraphrases, not original prompts.
send_message_to_thread: review 40 fixed event records and write one candidate table. It acknowledged the correct task and reported progress. A mid-turncontextCompactionevent then occurred. The subsequent final response answered an older, unrelated topic; the required output file did not exist at that point.contextCompactionevent, 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
functionCallOutput / send_message_to_thread. This does not by itself establish its inference-message role or priority.remote_compaction_v2=true; the exact branch taken by the two existing failed turns is unverified.Unconfirmed source-code lead
The public rust-v0.153.4 compact_remote_v2.rs has
build_v2_compacted_historyandis_retained_for_remote_compaction_v2; ordinaryFunctionCallOutputitems 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.
FrankHZ commentedon Sep 11, 2026
Reproduced again on Windows Codex Desktop with bundled
codex-cli 0.153.4on September 10, 2026 (America/Chicago).Sanitized timeline, in CDT (UTC−05:00):
function_call_outputwith acodex_delegationwrapper. The receiver acknowledged the correct assignment.compactedrecord 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.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_triggermetadata 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.
HS7097 commentedon Sep 13, 2026
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.
IvanKashitskii commentedon Sep 16, 2026
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
26.908.9136.0codex-cli 0.154.0-alpha.6.2Observed 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 namedfunction_call_outputitems with namespacecodex_app. The receiver acknowledged and executed B.All five inspected
compacted.replacement_historyrecords 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):
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_v2retains certain AgentMessage/Message items but returns false for FunctionCallOutput. The public TUI'sdynamic_tools.rs::start_turnintentionally delivers delegated input throughTurnStartParams.tool_outputto 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.
andriyo commentedon Sep 29, 2026
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
26.924.22138, build11645, macOS. Version/build read from the app bundle after the incident; the executable version used by the failed turn was not independently verified.Observed sequence
send_message_to_thread(Task B). The app displayed it as “Sent by ChatGPT from another task.”functionCallOutput, namesend_message_to_thread, namespacecodex_app, with a delegation wrapper.contextCompactionevent appears in that same turn.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.
javadavado-svg commentedon Oct 3, 2026
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:
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.
blockjacc commentedon Oct 3, 2026
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:
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.
phoenixweiss commentedon Oct 3, 2026
Additional macOS reproduction observed on October 4, 2026. This confirms that the failure is still present in a newer Desktop/CLI build.
Environment:
26.930.31730, build12947codex-cli 0.160.026.7(25G229), arm64Sanitized persisted sequence (UTC):
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:
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.
bobbyleeweiwei-bobby commentedon Oct 8, 2026
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
26.1002.7124.0(Windows Store installation; the ChatGPT host process runs from this package).codex-cli 0.162.0-alpha.2.10.0.26300, x64.gpt-6.1-sol, reasoning effortxhigh.Sanitized observed sequence (UTC)
send_message_to_threadto 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.compactedrecord 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: nullin 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_outputrecords containing acodex_delegationwrapper. For the second compaction, inspection of the visiblereplacement_historyfound 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.
realgyeongminnoh commentedon Oct 13, 2026
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
gpt-6-astra, reasoning effortultra, both before and after compaction.OpenAI.Codex 26.1007.2314.0; bundledcodex-cli 0.162.0-alpha.17.2; Windows 11 x64, build10.0.26300.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 asfunction_call_output, namespacecodex_app, namesend_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: acompactedrecord 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.
RongNianXin commentedon Oct 14, 2026
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
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.Observed sequence
Task A was a local instruction-refresh request. Task B was a subsequently authorized, bounded implementation assignment delivered by another existing chat.
send_message_to_thread, persisted as a namedfunction_call_output. The receiver read the source human authorization, acknowledged B, recorded it as started with an absolute deadline, and sent a startup receipt.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
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_threadcompaction/cold-resume scenario. The implementation requiresmetadata.client_authored=true, a presentname, an absentcall_id, and the enabledretain_client_tool_outputsfeature. 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.
phoenixweiss commentedon Oct 18, 2026
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
26.1013.40934, build20770codex-cli 0.163.0-alpha.10.226.7.1(25G241), arm64Sanitized observed sequence
contextCompactionevent occurred in that receiving turn.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
Suggested regression: handled direct instruction A → newer human-approved B → B delivered through
send_message_to_threadand 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.
kilalice commentedon Oct 21, 2026
Additional occurrence observed on 2026-10-21 (Asia/Tokyo) in Codex Desktop on Windows.
Observed sequence
send_message_to_threadto the existing worker chat.read_threadto inspect the source instructions.contextCompactionitem then appeared in the same receiving turn.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.
kkonstvol-lab commentedon Oct 21, 2026
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:
send_message_to_thread.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
26.1016.51333, build21161codex-cli 0.163.0-alpha.1126.5, arm64The 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_threadconstructs aturn/starttool 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:
TurnToolOutput.retain, defaulting to falseretain: trueinto a retained annotated response itemA separate feature listing from that bundled executable reported
retain_client_tool_outputs=falseandcontext_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.
rossky094-hub commentedon Oct 23, 2026
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
26.1016.61520, build21421; bundled executable:codex-cli 0.163.0-alpha.11.1; macOS27.0.1. These are inspection-time versions, not a verified executable history for every earlier occurrence.turn_contextrecords namegpt-6.1-sol. This is recorded configuration, not independently verified server-side model routing.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.
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: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
function_call_output, containing acodex_delegationenvelope with the exact assignment ininput.replacement_historyhas 75 items: 69 user messages, four developer messages, one developeradditional_toolsitem, and one opaque compaction item. There are no standalone assistant messages or function-call outputs in that explicit list.retained_context.sender_deliveriescontains a partial source-chat user-history package, not a verbatim copy of the current specific delegatedinput. Those two forms of context should not be treated as interchangeable.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.retainmechanism and its feature activation are actually connected to desktopsend_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.
bfpbr5 commentedon Oct 27, 2026
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 onrust-v0.164.0,rust-v0.166.0-alpha.1andmain(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:The delegated task itself (a
function_call_outputwithoutcall_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 bysend_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.rsgoes throughbuild_compaction_replacement_history, andsession/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_outputsflag, and the desktop app does not currently sendretain: truewithsend_message_to_threaddeliveries, 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.
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 triggeringfunction_call_outputand use it as the insertion anchor.Related: #42611, #47592, #45894, #27731, #8648.
phoenixweiss commentedon Oct 28, 2026
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
26.1023.50603, build22391codex-cli 0.165.0-alpha.1.226.7.1(25G241), arm64Sanitized observed sequence
contextCompactionevent was recorded in the same turn.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
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.
heyxjacob commentedon Nov 5, 2026
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.
masonturveysonicdiy commentedon Nov 11, 2026
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):
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.
masonturveysonicdiy commentedon Nov 11, 2026
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):
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.
javadavado-svg commentedon Nov 12, 2026
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:
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: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.
masonturveysonicdiy commentedon Nov 19, 2026
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-solwith 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:
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.
masonturveysonicdiy commentedon Nov 20, 2026
November 20 recurrence in the same Linux Codex Desktop chat as yesterday’s report, now on
gpt-6.2-solwith 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.
masonturveysonicdiy commentedon Nov 20, 2026
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.
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.