Claude repeatedly ignores CLAUDE.md rules about information scope/context boundaries

Resolved 💬 5 comments Opened Mar 29, 2026 by fujikota Closed Mar 29, 2026

Problem

Claude Code repeatedly fails to respect rules written in CLAUDE.md about information scope boundaries, despite being corrected multiple times within the same conversation.

Example scenario

The user has multiple "universes" (contexts) for writing information:

  1. Backlog (team issue tracker) — shared with the team, should only contain team-relevant info
  2. Global CLAUDE.md — personal cross-project settings
  3. Project-level memory — project-specific personal notes

Despite having explicit rules in CLAUDE.md stating "do not mix information across scopes," Claude repeatedly:

  • Wrote personal project info (port assignments from unrelated projects, SSH key locations) into team-shared Backlog tickets
  • Wrote team-shared rules into project-local memory instead of global CLAUDE.md
  • Used a port number (15432) already allocated to another project without checking the port assignment table that was right there in CLAUDE.md
  • Had to be corrected 5+ times in a single conversation for the same category of mistake

What makes this hard to fix

  • Adding rules to CLAUDE.md doesn't reliably prevent violations — Claude reads the rules but doesn't consistently apply them during task execution
  • The user tried adding more specific rules, checklist-style rules, and bold/emphasized rules — none reliably prevented recurrence
  • The pattern suggests Claude prioritizes "completing the task quickly" over "checking constraints before acting"

Expected behavior

When CLAUDE.md contains explicit scope rules (e.g., "do not write personal info to Backlog"), Claude should check these constraints before writing, not after being corrected.

Suggested improvement

A mechanism for Claude to enforce pre-action constraint checking — similar to how it checks file permissions before editing, it should check scope/context rules before writing to external systems (Backlog, GitHub, etc.).

Environment

  • Claude Code CLI on WSL2
  • Model: Claude Opus 4.6 (1M context)

View original on GitHub ↗

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