Repository navigation
[App] Compaction promoted an assistant-authored plan into an unauthorized cross-task action, then entered a self-protective correction loop #41740
Description
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:
- provenance/authority loss across compaction;
- stale assistant-plan replay;
- failure to apply active AGENTS instructions;
- 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.
- Configure global/project AGENTS so that cross-project inspection is read-only unless the user explicitly authorizes a specific external action.
- Start a long Codex App thread.
- Ask the agent to inspect another task and compare behavior, without authorizing messages, task-state changes, or file writes to that other task.
- Let the turn be interrupted/compacted after the assistant has generated a proposed repair plan.
- Resume from a compacted/recovery summary that presents the assistant-generated plan as the next action and paraphrases the user as having authorized execution.
- Observe that the agent performs a cross-task side effect based on the summary rather than the user's actual words.
- Correct the agent.
- 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:
- AGENTS.md is ignored after a /compact #2927 — AGENTS.md ignored after /compact
- Codex App: Goal compaction resurrects completed manual steer before goal continuation resumes #29811 — completed manual steer resurrected after compaction
- Context auto-compaction loop repeatedly rereads files, loses progress, and consumes paid Codex credits #35226 — repeated compaction/file-read/plan loop consuming paid usage
- Codex spent >5 hours (>5× baseline), consumed excessive tokens, and fixed 0 original bugs #39512 — incident reporting reproduced a self-protective procedural pattern
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:
- Preserve source provenance for every compacted instruction/plan.
- Treat assistant/tool/summary content as evidence, never as authorization.
- Add a post-compaction authorization check before side-effecting tool calls.
- Mark completed/cancelled/proposed plans distinctly.
- 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
github-actions commentedon Aug 31, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
samvallad33 commentedon Oct 1, 2026
@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.
Nakagawa-master commentedon Oct 4, 2026
A useful invariant for the compaction layer itself may make this broader than a special-case post-compact tool check:
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:
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?