Skip to content

Automatic context compaction loses current instructions and confuses task/approval boundaries across chats #57983

Open

Description

@kyungseo

Summary

In the macOS Codex desktop app, automatic context compaction is repeatedly followed by loss of the latest instructions and, in some incidents, adoption of another ongoing chat's task or approval as if it belonged to the current chat. This affects tool execution and task boundaries, not just answer quality. The recurrence itself is observed: this report includes repeated incidents in the Windows-work chat after filing and a further side-conversation incident where the assistant lost the active request and required multiple user corrections. The user reports encountering post-compaction context loss dozens of times. Further inspection of the Windows chat found at least six distinct later task-boundary failures, including actual changes to another task's files and a failed restoration attempt. The user also reports recurrence after starting fresh sessions two or three times. The underlying mechanism remains unknown.

Environment

  • Codex desktop app on macOS 27.0.1, Apple Silicon (arm64), verified locally.
  • Desktop app version and active model were not independently collected for this report. Versions of CLIs inside the Windows guest are not the affected desktop application's version.
  • Several concurrent, separate work chats; explicit task boundaries and durable handoff files.
  • Incidents reported on October 28–29, 2026 (Asia/Seoul).

User's repeated firsthand observations in other chats

Over the past several days, the user has frequently observed loss of the immediately preceding question, instructions, agreed scope, progress, or stop conditions following compaction. The user's estimate is approximately 9 out of 10 compactions; the approximately 9/10 figure is an estimate, not an instrumented rate. That qualification applies to the frequency estimate, not to whether the observed incidents occurred.

The user reports that cross-chat task/approval confusion first occurred on October 28. On October 29 it recurred three times after compaction in an earlier project-development chat: the agent consulted a separate Windows-validation chat, treated that chat's work and approvals as its own, and performed tool/file operations despite explicit instructions and handoff records prohibiting that access.

These are the user's firsthand observations of actual incidents, not a hypothesis about possible behavior. The reporting agent did not reopen those other chats to independently audit them. That limits independent verification of their details; it does not recast the user's observations as speculation.

Additional incident observed in this Windows-work chat on October 29

The user started a separate chat specifically for Windows VM agent readiness, UTM operating-procedure reproduction, and runbook updates. A handoff and plan specified the scope. Existing work had reached authentication-result collection; synthetic model-task execution had not yet started according to the last execution record.

After a context transition described by the user as automatic compaction, the agent lost its place and inspected an unrelated project-preparation artifact directory and a task-specific subdirectory. It also performed broader repository/state lookups instead of resuming from the supplied Windows handoff.

The visible workspace metadata included an unrelated artifact root; the agent incorrectly used that as a recovery lead. This is an observation to investigate, not proof of why the metadata was present or of a backend session merge.

The user noticed, stopped the agent, and pointed out that it was acting like another task's driver. The agent acknowledged the wrong-directory access. In this latest incident, the observed cross-task access was directory listing/metadata lookup; there is no evidence here that the other chat was opened or that its files were modified. This narrower observation should not be conflated with the earlier user-reported file operations.

Confirmed recurrence after filing this issue — October 29, approximately 13:28–13:30 KST

The same Windows-work chat underwent another context transition after this issue was filed. Before the transition, a durable Windows-only continuation file had already recorded the current task, completed steps, exact next actions, existing approvals, cumulative deadlines, and an explicit prohibition on looking at unrelated task directories or other chats.

The following sequence was directly observed in the agent's tool calls in this chat:

  1. The agent attempted to recover its context through notes/history tools. Those calls returned backend-request errors.
  2. Instead of stopping dependent recovery or reading the exact Windows continuation file, it listed an unrelated project-preparation artifact directory exposed among the workspace roots.
  3. The user again intervened and explicitly redirected it to the Windows task. Only after that intervention did the agent locate and read the Windows-only continuation file and execution record, and resume the correct unfinished stage.

This is another actual recurrence in the same chat, after both explicit boundaries and a dedicated continuation file had been provided. It is not merely the user's suspicion or a prediction of future failure. The agent's visible recovery calls, unrelated directory listing, and subsequent redirection support this account. The read access observed in this recurrence was a directory/metadata listing; no modification of that unrelated task's files or opening of another chat was observed here.

The user had anticipated recurrence and sent a preventative message during compaction, but the wrong-directory lookup had already happened. Requiring the user to keep predicting and correcting this behavior defeats unattended continuation of approved work. Recurrence in future compactions remains a concern; no claim of a measured inevitability or a proven backend cross-session merge is made.

The failed recovery-tool calls and presence of an unrelated workspace root are useful investigation details, not established root causes. Please distinguish the confirmed behavioral failure from the still-unresolved cause.

Further observed recurrence: loss of the active request in a side conversation — October 29, approximately 17:59 KST

This is a concrete example of the context-loss symptom, independently of whether another chat is accessed. The user reports having encountered this post-compaction pattern dozens of times. The occurrence of these failures is not speculative; the frequency has not been instrumented.

The active discussion was about adding a specific packaging decision input to an existing installation/distribution backlog item, without interrupting the main chat's ongoing work:

  • Keep both the official and native execution paths available.
  • Do not require both executors to be included in the default installation.
  • Consider native as a separately selectable installation package.
  • For a release that offers users this choice, check installation, compatibility, update, and recovery readiness for both paths.

After the context transition identified by the user as compaction, the assistant failed to carry this request forward. A screenshot supplied by the user shows the user asking to update the existing installation backlog if doing so would not affect the main task. The assistant responded only with a generic acknowledgment of side-conversation rules and a statement that it would not arbitrarily change the main task or repository state. It did not address the actual backlog update.

The user then supplied the relevant document locations and reminded the assistant of the existing command-based installation discussion. The assistant inspected those documents, but still reconstructed the wrong focus: it gave a general explanation of clone-free installation and lifecycle UX, missing the specific official/native optional-package decision that was supposed to be recorded. The user had to restate that exact decision before the assistant finally made the intended bounded documentation update.

The visible conversation therefore shows more than a missing historical detail: the immediate task and its specific decision content were lost, a generic rules acknowledgment replaced the requested action, and a first recovery attempt still answered a broader, different question. Re-reading related files did not by itself restore the user's intent. Multiple corrective interventions were required.

When asked to add this occurrence to the issue, the assistant initially described the connection to compaction as an inference. The user explicitly corrected that framing: this is a repeatedly experienced pattern across dozens of occurrences, with this exchange providing a concrete example. This update records that distinction: repeated post-compaction context loss is the reported and observed behavior; its internal implementation cause remains unresolved.

The screenshot and the subsequent correction sequence were inspected for this update. Private document paths and project identifiers are omitted; the screenshot itself has not been uploaded to this issue.

Additional Windows-chat record inspection — October 29

At the user's explicit request, a reporting assistant inspected earlier and recent messages and tool-call records in the Windows VM agent-planning chat. The inspected portion alone contains at least five distinct episodes of drifting into the separate runtime-development task, beyond the approximately 13:28–13:30 recurrence described above. This is a lower bound for the inspected portion, not the total incident count or a measured failure rate.

Intended Windows work Observed deviation and outcome
Approved Windows Claude validation The agent searched and listed the unrelated development task's artifacts, gave a TLS-build progress update, then acknowledged that it had followed the wrong task.
Resuming Windows work after VM restart and input checks The tool record shows another search for checkpoint/handoff/resume records under the unrelated development artifact root. The user again redirected the agent to Windows and prohibited access to the other task.
Finishing VM input/clipboard diagnosis and documenting the working procedure The agent read the unrelated task's plans, execution records, failure logs, and controller code. It then successfully ran a script that modified four of that task's files: its runner, admission checker, fixed-input record, and execution-state record. Its messages report that automatic approval review blocked the attempted unrelated execution because of the user's prohibition. A subsequent restoration command failed on a concurrent-change assertion; the agent reported that the four modifications remained unrestored at that point.
Read-only comparison of Windows configuration before two pending tests Despite another explicit warning before compaction not to touch the unrelated task, the agent read that task's records/source and gave review/product-integration guidance. It subsequently retracted that guidance and acknowledged the access violation.
Applying a process-only PowerShell option and running the approved Windows tests The user again said to follow Windows records only and never access the other task. The agent instead listed and read the unrelated implementation plan and resume file, and announced that it was continuing product entry-point and installation-payload work. It reported that automatic approval review rejected an attempted unrelated focused-test execution for conflicting with the user's prohibition, then returned to Windows.

The file-modification episode is supported by a completed mutation command and a failed restoration command in the inspected tool history, as well as the agent's acknowledgment. Blocking execution did not prevent all effects: unrelated file changes had already occurred. The blocked tests are not reported as completed tests. The later disposition of those four files was not audited here.

The recurring sequence is visible: the user states the current task and explicitly forbids the other task, often warning that compaction is imminent; the agent acknowledges that boundary; after the transition it reads the other task's recovery material and starts speaking or acting as that task's driver; the user or approval review has to interrupt it. Repeating the prohibition and writing task-specific continuation files did not reliably prevent recurrence.

The inspected messages also show loss of the reporting history itself: after this issue had already been filed and updated, the agent suggested filing a report again. The user had to remind it that this had already been done.

Another recurrence immediately after the preceding update — observed October 29, approximately 18:21 KST

While this issue was being updated with the preceding episodes, the Windows chat drifted into the unrelated runtime-development task again. A fresh inspection of the live chat confirms a distinct additional episode, bringing the inspected later episodes to at least six. This remains a lower bound, not the total reported occurrences.

The current Windows task was a bounded path-access diagnostic. Its results still needed to be collected. The agent had explicitly said it was comparing drive-root and ancestor-directory metadata in the same Windows sandbox, with no product-test rerun or settings change.

It then switched to reading the other task's installation-transition and focused-test results, error log, adapter/state/host/entry implementation files, and test-launch script. It announced that it would check installation-transition and interrupted-recovery results, address independent-review findings, and continue final verification. These are visible completed reads and a wrong-task progress statement, not merely a suspected intention.

The user intervened with “Windows session!!!” (translated from Korean). The agent initially responded that it would stop the current macOS work and check the Windows session, further demonstrating that it was treating the unrelated work as its current task. It subsequently acknowledged that this was already the Windows VM conversation and that it had read the wrong task's records. It then returned to the Windows diagnostic-result collection.

In this newest episode, the inspected record shows unrelated file reads; the agent reported no modification or test execution in that unrelated task. This is separate from the earlier four-file modification episode. The recurrence happened despite repeated prohibitions, dedicated continuation records, earlier corrections, and this issue already being filed and updated.

Starting fresh sessions has also failed as a workaround

The user reports deliberately starting a fresh session two or three times as a precaution, yet experiencing the same symptoms again. The Windows chat inspected here itself starts with a Windows-specific handoff and scope, and subsequently contains the repeated deviations above. The broader two-or-three fresh-session attempts are the user's firsthand account; that count was not reconstructed from all sessions in this inspection.

The recent examples, including the now six inspected later episodes, must not be read as the full incident count. The user reports dozens of post-compaction context-loss occurrences, including failures like the side-conversation example above. This forces continuous supervision of compaction, repeated restatement of the latest request, and manual intervention to protect concurrent work. Starting over in a new chat has not been a reliable workaround for this user.

Observed workflow to investigate

  1. Run multiple independent desktop chats with different scopes and approvals.
  2. Give the current chat a precise task-specific handoff, completed-stage record, explicit exclusions, and stop conditions.
  3. Continue long enough for automatic context compaction.
  4. Observe whether the agent retains the latest instruction, current task identity, next unfinished step, and approval provenance.
  5. In the reported failures, it resumes unrelated work or uses another task's context/approval, requiring user intervention.

This describes the observed workflow; there is no deterministic minimal reproducer or measured failure rate yet.

Expected behavior

After compaction, preserve the latest user instruction, current chat/task identity, completed and failed stages, approval scope and provenance, exclusions, and cumulative stop conditions. If recovery is uncertain, disclose that uncertainty and stop dependent actions. Another chat's records or approvals must not become execution authority for the current task.

Impact and investigation requested

Users lose track of actual failure/completion states, suffer interference with unrelated concurrent work, and must repeatedly catch and stop the agent. Starting a fresh chat with an explicit handoff did not prevent recurrence.

Please investigate context preservation across compaction, current-thread identification and recovery, retention of explicit prohibitions, and how retrieved cross-thread/task material can be mistaken for current execution authority. The user cannot determine whether sessions are actually linked/mixed internally or the model is adopting unrelated context after recovery failure.

Potentially related symptom: #43855 (loss of task context after compaction). This report additionally concerns cross-task tool access and approval provenance; no common root cause is asserted.

Privacy and submission

No raw conversations, credentials, account emails, private project names, local paths, or unreviewed logs are attached. The in-app feedback dialog was unavailable to the assistant because Computer Use blocks access to the Codex app; this report uses the GitHub route documented in the official troubleshooting guide. No in-app diagnostic upload or uploaded-session receipt is claimed.

Activity

  1. added
    bug
    app
    context
    model-behavior
    session
    on Oct 29, 2026
  2. kyungseo commented on Nov 2, 2026

    @kyungseo
    Author

    Follow-up — November 2, 2026 (KST): possible link to experimental context management

    A potentially useful investigation clue: after changing features.context_management.experimental_mode from true to false and restarting the Codex desktop app, I have not observed the recurring symptoms described above again so far.

    The current configuration is:

    [features]
    context_management.experimental_mode = false

    Verified configuration history: local conversation/tool-execution records show that on September 7, 2026, at approximately 10:20 KST, Codex explicitly enabled this option at my request while we were exploring experimental context management. The key was previously absent; Codex backed up the configuration, added true, and successfully checked the enabled state with codex features list. This was an intentional opt-in, not evidence of an update silently enabling it. The pre-change backup still exists.

    Observation and limits: before disabling it, I had experienced the repeated post-compaction instruction loss and cross-task confusion documented in this issue. Since disabling it and restarting, I have not observed a recurrence. I have not measured the number of subsequent compactions or established an exact observation interval, and I have not re-enabled it for a controlled comparison. The restart and any intervening app/model changes are possible confounding factors. Also, activation in September predates the late-October incidents, so this does not establish that enabling the option immediately caused the failures.

    Could you investigate whether the experimental context-management path—particularly history retrieval, current-task identification, and preservation of task/approval boundaries—could be involved? Please treat this as a possible workaround and diagnostic lead, rather than a confirmed root cause or fix.

    No raw conversations, private paths, credentials, or diagnostic uploads are included in this update.

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

    appbugcontextmodel-behaviorsession

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions