Repository navigation
Description
What version of the Codex App are you using (From About Codex dialog)?
Codex desktop app 26.915.31945 (bundle build 9922); bundled codex-cli 0.155.0-alpha.9.2.
What subscription do you have?
Not included in this public report.
What platform is your computer?
Darwin 25.5.0 arm64 arm (macOS).
What issue are you seeing?
After automatic context compaction in a long-running Codex App task, the agent resumed a previously answered, obsolete user request instead of the active delegated implementation task. It repeated local web-server troubleshooting for that old request, opened the page, and gave a final answer that the old problem was fixed. The active implementation task remained incomplete.
The local rollout records a successful compacted event at 2026-09-23 17:09:35 UTC. Its replacement history contained 9 user-message items, including the older URL-access request. The continuation used gpt-6-sol at xhigh effort. The first post-compaction tool sequence checked the local port and started the server for the old request, rather than continuing the implementation. This is an observed correlation with compaction, not proof of the exact internal root cause.
What steps can reproduce the bug?
- In a long-running Codex App task, ask and resolve a side request A. Here A was a local web page that would not open; the agent had already responded to it.
- Continue a different active implementation assignment B in the same task, delivered from a coordinating task with
send_message_to_thread. The agent acknowledges B and makes partial code/data progress. - Allow automatic compaction during B. In this instance the compaction completed at 2026-09-23 17:09:35 UTC.
- Observe the continuation: the agent acts on A as if it were current, performs tools for A, and ends the turn, leaving B incomplete.
This report intentionally does not publish the session ID, full transcript, private project paths, or research data. The local rollout metadata and redacted before/after event sequence can be supplied through an appropriate private diagnostic channel if requested. I have not independently reproduced it in a fresh task.
What is the expected behavior?
The agent should preserve the active assignment and the fact that A was already answered. After compaction it should continue B from the verified current state or explicitly flag a task-state conflict before any tool action. A historical user message must not regain current-task authority simply because it remains in replacement history.
Additional information
Related but not identical reports: #42051 (old completed instruction resurfaces after compaction), #45343 (delegated assignment lost after compaction), and #45296 (many historical user messages retained after compaction). This case is macOS, gpt-6-sol, and combines stale-request replay with an active delegated implementation task. No source files or full conversation logs are attached.
Activity
github-actions commentedon Sep 23, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
ourinkenn-code commentedon Sep 23, 2026
Supplemental local-history evidence (read-only; private rollouts withheld):
I checked two other Codex App task rollouts on the same Mac, in addition to the 2026-09-23 incident in this issue. Each records a
compactedevent followed immediately by a switch from unfinished work to an already completed, older request.These are two distinct additional tasks, not repeated compactions counted as separate users. Together with this issue's primary incident, they support a recurring active-task precedence failure at compaction boundaries. They do not establish a failure rate, a deterministic reproduction, or the precise model-vs-harness cause. A separate post-compaction loss of transient browser state occurred in the September 22 task; I am not counting that different symptom as another stale-request replay.
I reviewed #46953 as a closely related Windows/file-backed-goal case. This report remains useful as macOS evidence with different active-work contexts; maintainers can link or merge if investigation shows one underlying bug. I have not posted raw transcripts, session IDs, local paths, research content, or personal data. Redacted event sequences or private diagnostics can be supplied through an appropriate secure channel.
edwardswhiskeyblues-alt commentedon Oct 2, 2026
Supplemental Windows reproduction (sanitized; no private project names, paths, or account data):
This appears to be the same active-task precedence failure, now reproduced in Codex App 26.928.3736.0 on Windows.
Observed sequence
Only the read-only task-input verification had executed before compaction. The task input remained unchanged, and no authorized output file was created, so this was not merely a misleading UI message after successful work.
Replacement-history observation
The compacted replacement history contained seven visible items: the original bootstrap user message, current app/developer instructions, the workspace instruction block, an older short “you can continue” message, and an opaque compaction item. The current cross-task commission was not present as a separately inspectable user-message entry. This does not establish that the raw instruction was deleted; it does show that the worker continuation promoted the visible historical bootstrap over the current task state carried by the opaque compacted context.
The same receiving task showed the same signature earlier: a successful compaction at 2026-10-01 21:08:02 UTC was followed at 21:08:18 UTC by the identical historical bootstrap answer. This makes the new event a recurrence in one long-running Windows task, not a one-off ambiguous reply.
This is closely aligned with #45343, but adds:
task_completewith no network/server error;Expected behavior: after compaction, the latest accepted delegated commission must retain active authority. An initial bootstrap/waiting prompt must not regain authority. If the runtime cannot establish the active task reliably, it should stop with an explicit task-state conflict before producing a misleading completion response.
The affected task/thread identifiers and redacted event sequence can be supplied privately if maintainers need telemetry correlation.
azadag commentedon Oct 22, 2026
Additional sanitized recurrence evidence from October 20–22, 2026, matching this issue's active delegated-task versus completed-user-request pattern.
Environment
gpt-6.1-sol, reasoninghigh, provider IDopenai.26.1013.40934, build20770. The exact app/backend versions at incident time were not independently pinned.app_tool_send_message, not a scheduled heartbeat.Observed sequence (UTC)
send_message_to_threaddelivery assigns migration-safety and test-only CI work, with explicit scope limits. It is stored as afunction_call_outputcontaining acodex_delegationenvelope.compactedrecord is persisted.This is not a byte-for-byte UI replay: the wording changes and the latest recurrence includes new tool activity.
We found five later answers to the original question in this same chat, in cross-chat-triggered turns after compactions: October 21 at 00:52, 07:21, 22:23 and 23:08 UTC, and the October 22 example above. These are distinct assistant message records, not duplicate
task_completecopies. This is recurrence evidence in one chat, not a failure-rate estimate or five independent users.Inspectable compaction state
The latest inspected replacement history contains 25 items. Item 23 (zero-based) is the already-answered October 20 ordinary user question; item 24 is an opaque compaction item with
encrypted_content. There are no explicitfunction_call_outputitems carrying the newer delegations in that replacement list. Resume metadata still identifies the active cross-chat-triggered turn.The current assignment may still exist inside the encrypted compaction content. We cannot inspect that content and do not claim that the assignment was deleted. Replacement-history attribution metadata also contains
history_missing_checkpoint; this is a diagnostic clue, not a proven cause.Impact and expected behavior
The active assignment can lose its closeout even after real implementation work, while a historical question regains priority. Subsequent work has resumed; this report does not claim the task remains stopped or that source changes were lost.
Expected: preserve the latest authorized active assignment, its refinements and boundaries across compaction, and preserve the answered state of historical requests. Tool-delivered instructions must retain their provenance; a tool message must not gain authority simply by claiming user authorization.
A compact current-task checkpoint was added to the existing handoff as a local mitigation, with no new review/launch gates or automatic reruns. Its effectiveness across a future compaction has not been established.
This adds a newer model/configuration and timestamped repeated observations, not an isolated fresh-session reproduction or a confirmed model/harness/proxy root cause. Related #54646 has a similar visible-history distinction, but shared causation is not established.
Privacy
Project names, local paths, account details, chat/turn/message IDs, raw transcripts, tool output and encrypted payloads are omitted. Selected source-record hashes and exact identifiers are retained locally; nothing from the full private session is attached.
n0rpan123 commentedon Oct 26, 2026
Additional sanitized natural-occurrence evidence from macOS, 24–26 October 2026. Related: #42695 describes the same task-message/compaction pattern. Adding here rather than opening another duplicate.
Observed environment
Natural cases, UTC; task labels anonymized
What the records establish
Expected behavior / request
Preserve the exact active turn's triggering message identity, unfinished step, completed effects and constraints across compaction. Do not select a historical human question as the current objective merely because it remains visible. Preserve cross-task messages' original provenance and authority level; do not promote them into human approval.
Please investigate current-turn restoration and response targeting for task-message-triggered turns. We have not tested the alternative messaging workaround mentioned in #42695 and are not claiming it is supported or appropriate for our setup.
Evidence here is paraphrased and sanitized: no private project/issue IDs, task/message IDs, paths, account identifiers, raw transcripts, encrypted payloads, credentials or research content. All observations came from existing natural compactions; no test compaction or denied-operation replay was created.
n0rpan123 commentedon Oct 26, 2026
Follow-up to our earlier evidence, posted with renewed explicit user approval: a natural failure on 26 October shows that correct assignment context was available after compaction but was not followed.
Installed Desktop inspected: 26.1021.31345; bundled codex-cli 0.164.0-alpha.11.1; macOS. No test compaction was generated.
Sanitized sequence (UTC):
An observation-only monitor independently verified the original records. The context-first mitigation and repeated context in completed selection output passed local extraction/presentation tests but failed this natural continuation. This rules out missing hook injection and missing successful selection as sufficient explanations for this occurrence; it does not establish the internal model/runtime cause or reveal encrypted compaction contents.
We preserve original roles, approval boundaries, denials and expired delivery history. No synthetic review, compaction or replay was used. Related retention discussion: #42695 and #52937. Please advise whether the existing Desktop cross-task sender can retain tool-role messages or whether another supported current-objective recovery fix is available.
This report omits private task IDs, project issue numbers, local paths, raw transcripts, credentials and customer data.
n0rpan123 commentedon Nov 1, 2026
Additional natural recurrence, 1 November 2026, macOS. This distinguishes correct recovery-hook output from failed task continuation. Affected turn metadata records GPT-6 Astra and an
app_tool_send_messagetrigger; exact Desktop build was not captured for this incident.Observed sequence (UTC):
Finding: In this occurrence, the local hook retrieved and injected the right objective and step without truncation, but the continuation did not follow them. Missing hook context is therefore not a sufficient explanation. The visible history favors an obsolete request; the internal model/runtime cause remains unestablished. No selection-helper failure was demonstrated.
Please investigate preservation and precedence of the active delegated objective after compaction, including cases where a hook correctly restores it. We are retaining the existing recovery mechanism rather than adding more instructions based on an unproven extraction defect. No test compaction, denied-command replay, new activation or interruption of ongoing implementation was performed for this investigation. Private task IDs, paths, project details and raw transcripts are omitted.
n0rpan123 commentedon Nov 6, 2026
Two additional natural occurrences; local recovery-reader defect isolated (6 November 2026)
Two active delegated tasks returned to completed historical requests immediately after compaction:
The saved replacement histories contain respectively 45 and 226 items: developer/tool-definition context, user messages, and an encrypted compaction item. Neither contains visible assistant messages or tool results for the current work. We did not inspect encrypted compaction contents, so this is not a claim that the private compaction summary contained no current context.
Separately identified local mitigation failure: our existing SessionStart recovery hook returned
{"state":"unavailable","authorization_effect":"none"}in both cases. Its reader searched only the last 4 MiB for the interrupted turn's start. Those turns had already accumulated 14,498,338 and 9,544,576 bytes before the compacted record, respectively; the start records were outside the window. This local defect is ours, not attributed to Codex.We corrected only that reader to read complete JSONL records backward in chunks until the latest compaction and interrupted turn start, then emit the existing small source-linked recovery evidence. No new instructions, service, sender, permission changes or replay behavior were added.
Validation used read-only saved-record copies, not test compactions:
unavailableon both captured failures.observed, matching each exact latest pre-compaction step; output was approximately 2 KB per case.Please correlate the original obsolete-request continuation with host retention/attribution around delegated-task compaction. These occurrences also had a failed local recovery mitigation, so they should not be presented as proof that the model ignored correct hook evidence. Prior instances in this report with correct hook output remain separate evidence.
No synthetic compaction/review, notification, tap, provider call or denied action was triggered by this investigation or fix. Original failures, completed deliveries and human limits remain preserved. Private identifiers, paths, repository details, transcripts, dialogue and credentials are omitted.
n0rpan123 commentedon Nov 7, 2026
Natural recurrence on 7 November: historical publication replaces unfinished implementation despite correct recovery-hook evidence
A parent task was carrying out an approved implementation and final offline verification. At 09:17:14.100 UTC, natural compaction occurred. Its saved replacement history contains 226 items: 220 user-role messages, four developer messages, one tools item and one opaque compaction item.
The last visible user message in that replacement history is an older publication-approval answer for an already-completed status comment. The immediately preceding retained human request also concerns historical publication. The current delegated continuation is not present in the visible replacement messages we inspected. The compaction item's summary is stored as
encrypted_content; we cannot inspect its plaintext and do not claim it omitted or misstated the current objective.At 09:17:14.175 UTC, the existing recovery hook supplied:
Nevertheless, the first subsequent visible assistant response resumed the old publication request. It checked the existing issue, confirmed the old comment was already published, and ended its turn. Current candidate verification/handoff remained unfinished; dependent teams waited.
After explicit coordination supplied the same current objective and unfinished step, the parent acknowledged the mistaken historical continuation. It recovered the original successful build result rather than launching a replacement, retained the completed child's edits, and resumed current checks. No duplicate historical publication occurred.
This case distinguishes correct local recovery evidence from failed post-compaction continuation. It does not establish whether the root cause is the encrypted summary, ordering/retention of visible historical messages, or the model's handling of the recovery hook. We found no basis in this comparison for another local reader change.
Please correlate the replacement-history tail, encrypted compaction summary and first continuation. Expected behavior: finishing an already-completed historical action must not replace the active approved objective and unfinished step when those are supplied by current original-record recovery.
No synthetic compaction, denied-operation retry, policy change or new execution authority was introduced to investigate. Original evidence and denials are preserved. Private task/message/issue identifiers, repository names, paths, payloads and encrypted content are omitted. Times are UTC; findings concern saved records, not independently captured model transport.
n0rpan123 commentedon Nov 12, 2026
Follow-up: recurrence after successful SessionStart recovery-context delivery (12 November 2026)
Sanitized comparison of two naturally occurring recoveries in the same long-running task:
Both replacement histories contained 226 ordinary user messages, five developer messages and one opaque compaction item. Both ended with the same historical approval reply, originally received 10 November 08:06:56 UTC. The newer assignment arrived as a task-message tool result. We did not inspect encrypted compaction contents and cannot establish the model's internal cause. The successful counterexample shows the old retained reply does not invariably cause failure.
A later genuinely new answer to a separate historical publication question was handled correctly for that comment, but the current implementation still was not resumed. We distinguish that new user input from the earlier compaction detour.
Local mitigation: the existing recovery hook now reports the interrupted turn's original start timestamp and explicitly says that retained-history position does not make an older request new; newer task messages may postdate the last ordinary user message. Applicable older stops/limits/denials remain binding and genuinely newer user changes take precedence. This does not alter permissions, authorize retries, or rewrite history.
Validation: 49 offline regression tests passed, including genuine newer-stop preservation. Four saved turns (two successful, two failed) were replayed through the read-only evidence reader in temporary fixtures, preserving source timestamps, current operation locators and source files. These checks validate evidence presentation, not future model adherence. No synthetic live compaction, provider call or denied-command replay was performed.
Could you investigate how the retained ordinary-user-message tail and current delegated task are prioritized after compaction when the SessionStart context already identifies the current objective? Full private transcripts, project details and credentials are intentionally omitted.
Gnufoyyy commentedon Nov 12, 2026
Additional Windows / Astra report of losing the active task immediately after automatic context compaction. Adding here because it resembles the Windows continuation failure reported above, rather than opening a duplicate.
Environment: Codex on Windows, Astra model. Exact app version/build is not recorded in this report.
Observed sequence in the conversation UI:
Get-Location, then replied: “请提供需要处理的具体任务。” (Please provide the specific task to work on.)It stopped instead of continuing the already accepted task. I have been seeing this pattern repeatedly when long Astra conversations reach automatic compaction, although I do not have a measured failure rate or a minimal reproduction.
Expected: preserve the active task, confirmed decisions, completed steps, and remaining work across compaction, then continue from the current state without requiring me to restate the task.
This report describes the visible loss of task continuity, not proof that stored history or edited files were deleted, or that the root cause is specific to Astra. Private project details, file paths, and research content are omitted. Please investigate the transition from the accepted task to the first post-compaction response.