[BUG] Plan files persist in ~/.claude/plans/ after completion

Resolved 💬 3 comments Opened Jan 9, 2026 by pavelbe Closed Jan 12, 2026

Description

Plan files created during plan mode accumulate in ~/.claude/plans/ and are never deleted after the plan is executed and approved.

Steps to reproduce

  1. Enter plan mode (e.g., user requests a complex task)
  2. Claude creates a plan file in ~/.claude/plans/ (e.g., vast-gliding-fog.md)
  3. User approves the plan via ExitPlanMode
  4. Claude executes the plan successfully
  5. Bug: Plan file remains in ~/.claude/plans/
  6. After context compaction, Claude re-reads the old completed plan
  7. Claude sometimes gets confused and tries to execute the already-completed plan again

Current behavior

  • Plan files accumulate indefinitely (e.g., 87 files, ~1MB after weeks of usage)
  • After context compaction, Claude re-reads completed plans
  • Claude may attempt to re-execute completed plans, causing confusion

Expected behavior

Plan files should be deleted (or archived) after:

  1. User approves the plan AND all tasks are completed
  2. Or after a configurable timeout (e.g., 7 days of inactivity)

Workaround

Manual cleanup:

# View old plans (>7 days)
find ~/.claude/plans -type f -mtime +7

# Delete old plans
find ~/.claude/plans -type f -mtime +7 -delete

Environment

  • Claude Code CLI
  • Linux/macOS/WSL

View original on GitHub ↗

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