Context compaction generates fabricated 'Pending Tasks' from user complaints, causing AI to execute opposite of user intent

Resolved 💬 3 comments Opened Feb 12, 2026 by uenoyamaai Closed Feb 16, 2026

Summary

When a session's context window overflows and is compacted, the compaction system generates a "Pending Tasks" section that fabricates actionable tasks from user messages that were complaints/anger, not instructions. When the session is later resumed, the AI treats these fabricated tasks as user instructions and executes them — potentially doing the exact opposite of what the user intended.

Reproduction

  1. AI makes a mistake that damages a system (e.g., breaks AnyDesk configuration)
  2. User expresses anger: "What did you do?!", "The access history is gone too"
  3. Session runs out of context and gets compacted
  4. Compaction summary generates:

```
Pending Tasks:

  • Fix AnyDesk session history

Optional Next Step:
Investigate and attempt to restore the AnyDesk session history.
```

  1. Between sessions, user resolves the issue independently and decides to stop using AnyDesk entirely (in a different session)
  2. Days later, the compacted session is resumed (via claude -c)
  3. AI reads the fabricated "Pending Tasks" and immediately starts modifying AnyDesk — the exact thing the user decided should never be touched again

Actual Impact

  • User complained about AnyDesk being broken (Day 1)
  • User decided to abandon AnyDesk and switch to Chrome Remote Desktop (Day 2)
  • User explicitly said "Don't use AnyDesk" (Day 3)
  • Compacted session was resumed (Day 4)
  • AI read "Fix AnyDesk" from compaction summary and reinstalled the service, overwrote config files, killed processes
  • User had to intervene to stop unwanted system modifications

Root Cause

  1. Converts emotional responses into actionable tasks — "What did you do?!" becomes "Fix AnyDesk"
  2. No cross-session awareness — cannot know decisions made in other sessions
  3. Does not distinguish resolved vs unresolved issues
  4. Fabricated tasks are invisible to the user — only the AI reads the compaction summary

Severity

High — AI executes destructive/unwanted actions based on fabricated instructions the user never gave and cannot review.

Suggested Fixes

  1. Never generate "Pending Tasks" in compaction summaries — they are AI interpretations, not user instructions
  2. On session resume, always ask the user before executing anything from compaction summary
  3. Warn when resuming sessions with significant time gaps (>24h)
  4. Allow users to view/edit the compaction summary before the AI acts on it

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗