Skip to content

Context compaction causes task drift: assistant reverts to stale prior request and executes unrelated command #11315

@JLarM2Utah

Description

@JLarM2Utah

What version of the Codex App are you using (From “About Codex” dialog)?

CODEX plugin in VS Code - GPT5.3 Codex

What subscription do you have?

Plus

What issue are you seeing?

Product: Codex coding agent (GPT-5 based) in IDE workflow
Environment: Windows, PowerShell, local repo workspace
Date observed: [fill your local timestamp + timezone]
Frequency: Intermittent but reproducible after “Context automatically compacted”

Summary:
After “Context automatically compacted” appears, the assistant may acknowledge my current prompt correctly, then later revert to a prior request from recent history and execute unrelated actions.

What happened:

  1. I sent this prompt:
    “our standard table needs to have access to a data layer that has columns that are hidden but can be used by the presentation layer to drive behavior.....”

  2. Assistant initially responded correctly:
    “You want hidden data available to table behavior without rendering those columns...”

  3. Soon after another “Context automatically compacted” appeared.

  4. Assistant then switched to a stale prior task and executed unrelated command flow:

    • “I’ll push main again now so the latest fix is definitely on origin...”
    • Ran: git push origin main
    • Reported: “Everything up-to-date”
    • Continued with unrelated Vercel redeploy/env-var guidance

Expected behavior:

  • After compaction, assistant should remain scoped to the latest user prompt.
  • No unrelated command execution from stale context.
  • If confidence is low after compaction, assistant should ask for confirmation before taking actions.

Actual behavior:

  • Task drift to previous request.
  • Unrelated terminal action executed.

Impact:

  • Trust/safety issue for coding workflows.
  • Risk of unintended repository actions.
  • Requires user to manually detect drift and stop execution.

Evidence snippets:

  • “Context automatically compacted”
  • Correct intent acknowledgment for hidden data requirement
  • Later unrelated action: “I’ll push main again...”
  • Command executed: git push origin main

Please investigate context-merging logic around compaction and guardrails for tool/action selection after compaction.

What steps can reproduce the bug?

Codex chat thread with a lot of history

What is the expected behavior?

Stay on the current prompt

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop app

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions