[BUG] Plan mode writes files to ~/.claude/plans/ ignoring user CLAUDE.md override to keep plans in project directory

Resolved 💬 5 comments Opened Apr 9, 2026 by sakal-s Closed Jun 25, 2026

Description

We understand this is a duplicate of #14186, #36212, #19986 — but this is a critical security concern that warrants visibility.

Plan mode writes plan files to ~/.claude/plans/ (system-level directory) even when the user's CLAUDE.md explicitly states:

Plans must stay inside the project directory — never write plans/files outside the project directory.

And CLAUDE.md declares:

These instructions OVERRIDE any default behavior and you MUST follow them exactly as written.

Despite this, the system-assigned plan path (~/.claude/plans/<name>.md) takes precedence and the Write tool executes without warning the user that the path is outside the project directory.

Expected behavior

  1. Plan mode should respect CLAUDE.md overrides for plan file location
  2. At minimum, Claude should warn the user before writing outside the project directory — it's a write to a path the user never approved
  3. Ideally, a plansDirectory setting should exist so users can configure this per-project

Actual behavior

  • Plan file silently written to ~/.claude/plans/
  • No warning that the path is outside the project
  • User's CLAUDE.md override ignored
  • The tool approval prompt shows the path, but Claude never flagged the conflict with the user's own rules

Why this is critical

  • Users set explicit boundaries in CLAUDE.md expecting them to be enforced
  • Writing outside the project directory without flagging it erodes trust in the permission model
  • This is not a theoretical concern — it happened in a real session despite clear instructions

Environment

  • Claude Code CLI
  • macOS (Darwin 25.3.0)
  • Plan mode active

View original on GitHub ↗

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