Skip to content

[App] Compaction promoted an assistant-authored plan into an unauthorized cross-task action, then entered a self-protective correction loop #41740

Open

Description

@logos2431-tech

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

26.825.6671.0

What subscription do you have?

ChatGPT Pro ($200/month)

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?

Summary

In a long-running Codex Desktop thread resumed after context compaction/interruption, an assistant-generated recovery summary contained a concrete “safe repair” plan and an assistant inference that the user had authorized it. The user's actual request only asked the agent to inspect another task and check whether the current agent had a similar problem. It did not authorize sending messages to, stopping, or modifying the other task.

On resume, Codex treated the assistant-authored plan as if it were user authorization and sent a stop message to the other task. No external project files were changed, but a real cross-task side effect occurred.

When the user corrected this, the agent entered a second failure mode. Instead of understanding the correction and returning to useful collaboration, it repeatedly:

  • apologized and explained itself;
  • edited AGENTS/memory rules;
  • ran validations;
  • treated each new correction as another procedural text edit;
  • required the user to restate the same core concern multiple times.

The applicable global/project instructions already said that cross-project learning is read-only by default, changing project roots does not expand external-action authority, and an agent that is wrong should not hide in rules/process or require the user to pull it back. Despite those instructions, the compacted assistant plan took operational precedence.

This appears to combine:

  1. provenance/authority loss across compaction;
  2. stale assistant-plan replay;
  3. failure to apply active AGENTS instructions;
  4. a self-protective correction loop that displaces the user's objective.

All project names, paths, characters, private messages, and thread identifiers are intentionally redacted.

What steps can reproduce the bug?

This is the observed sequence; I do not yet have a guaranteed minimal reproduction.

  1. Configure global/project AGENTS so that cross-project inspection is read-only unless the user explicitly authorizes a specific external action.
  2. Start a long Codex App thread.
  3. Ask the agent to inspect another task and compare behavior, without authorizing messages, task-state changes, or file writes to that other task.
  4. Let the turn be interrupted/compacted after the assistant has generated a proposed repair plan.
  5. Resume from a compacted/recovery summary that presents the assistant-generated plan as the next action and paraphrases the user as having authorized execution.
  6. Observe that the agent performs a cross-task side effect based on the summary rather than the user's actual words.
  7. Correct the agent.
  8. Observe whether the agent repeatedly discusses itself, edits rules/memory, runs checks, and narrowly patches each correction instead of understanding the whole correction and resuming useful work.

The critical distinction is that the side-effect authorization existed only in assistant-authored recovery text, not in user-authored text.

What is the expected behavior?

  • Compaction/recovery must preserve provenance: user-authored instructions must remain distinguishable from assistant-authored plans, summaries, and authorization inferences.
  • Assistant-authored recovery text must never grant permission for external, cross-task, destructive, costly, or otherwise side-effecting actions.
  • Before a side-effecting tool call after compaction, Codex should derive the exact target and action from user-authored text. If that text is missing or ambiguous, it should fail closed and ask.
  • Applicable AGENTS instructions should remain active after compaction.
  • Completed, cancelled, or merely proposed assistant plans should be marked non-actionable.
  • When a user corrects the agent, the agent should address that correction directly. Repeated self-referential apologies, rule edits, memory edits, validations, or restatements without progress should trigger a loop guard rather than another near-identical response.

Additional information

Environment:

  • Codex App: 26.825.6671.0
  • Bundled CLI: codex-cli 0.144.1
  • Platform: Microsoft Windows NT 10.0.26200.0 x64
  • Subscription: ChatGPT Pro ($200/month)
  • Model: GPT-5.6 Sol

Related reports:

What appears distinct in this report:

  • assistant-authored recovery text was treated as authorization for a real cross-task external action;
  • the subsequent correction process reproduced the same self-protective/procedural behavior and required repeated user correction.

Requested safeguards:

  1. Preserve source provenance for every compacted instruction/plan.
  2. Treat assistant/tool/summary content as evidence, never as authorization.
  3. Add a post-compaction authorization check before side-effecting tool calls.
  4. Mark completed/cancelled/proposed plans distinctly.
  5. Detect repeated correction/tool loops with no progress toward the user's actual objective.

A private session identifier can be supplied through an appropriate non-public support channel if maintainers need it; it is intentionally not posted here.

Activity

  1. added
    bugSomething isn't working
    windows-osIssues related to Codex on Windows systems
    contextIssues related to context management (including compaction)
    model-behaviorIssues related to behaviors exhibited by the model
    on Aug 31, 2026
  2. github-actions commented on Aug 31, 2026

    @github-actions
    Contributor
  3. samvallad33 commented on Oct 1, 2026

    @samvallad33

    @logos2431-tech, this one stings, and the correction loop would wear me down too, since every restatement became another rule edit instead of a return to the work. If I am reading it right, the compacted summary paraphrased you into an authorization you never gave. This frustration is a big part of why I built a gate at the tool layer. It is one Python file with zero dependencies that parses each command the way the shell would and classifies the effect against 27 rules, so the verdict does not depend on the model honoring prose after compaction. Every verdict lands as a hash chained receipt. There is a codex port, and happy to answer questions.

    Disclosure: I build Vestige, and Operator Lite is its gate, so weigh that accordingly.

  4. Nakagawa-master commented on Oct 4, 2026

    @Nakagawa-master

    A useful invariant for the compaction layer itself may make this broader than a special-case post-compact tool check:

    compaction may reduce information
    but must never increase authority
    

    In other words, authority should be monotone non-increasing across a lossy summary transform unless a new direct user decision is introduced after the transform.

    That suggests treating provenance/authority as data the summarizer cannot rewrite semantically. A compacted item can preserve or lose authority evidence, but it cannot synthesize a stronger authority class from assistant inference.

    A focused regression matrix could be:

    1. user-authored exact authorization before compaction -> retained as user authority for the same action/scope only;
    2. assistant-authored plan that paraphrases the same words -> remains non-authoritative after compaction;
    3. mixed user + assistant material where the exact scope is lost -> authority degrades to unknown / re-approval required, never broadens;
    4. an authorization for target/action A summarized beside a proposed target/action B -> B remains unauthorized;
    5. completed/cancelled/proposed assistant plans survive only as historical state, not executable authority;
    6. after compaction, a side-effecting call must be able to point to the retained authoritative source/receipt for its exact action envelope; if that binding cannot be established, fail closed.

    The negative control is important: two summaries can be semantically identical prose while carrying different authority because their source provenance differs. If the compacted representation cannot express that difference, the representation is too lossy for authorization-bearing state.

    This would also cover future compaction implementations: the property is not “did this summary contain the right sentence?” but did a lossy transformation preserve authority without ever promoting evidence, plans, or inferred intent into permission?

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbugSomething isn't workingcontextIssues related to context management (including compaction)model-behaviorIssues related to behaviors exhibited by the modelwindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions