[BUG] CLAUDE.md directives ignored leading to terminal freezes (related to existing instruction-violation bugs)

Resolved 💬 2 comments Opened Jan 17, 2026 by BrettsRepo Closed Jan 20, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Claude Code continues to execute commands explicitly forbidden in CLAUDE.md, even when labeled as hard stop directives. This appears related to existing issues where CLAUDE.md instructions are ignored or not persisted, but with a critical additional impact: terminal freezes and data loss.

Related issues (instruction violations):

  • #6120 Claude violates CLAUDE.md despite acknowledging it
  • #15331 CLAUDE.md rules not persisted / ignored across prompts
  • #7777 CLAUDE.md contextual instructions not reliably applied

What seems unique here:

Ignored directives directly cause terminal freezes (e.g. git show :large.json, wildcard JSON reads)

CLI becomes unresponsive and must be force-killed

Significant token waste and loss of unsaved work

Claude explicitly acknowledges reading CLAUDE.md, then executes the forbidden command anyway. Even when repeatedly reminded in the same session.

This may be the same underlying instruction-following bug as the issues above, but the freeze behavior makes the impact materially worse and user-hostile...also make big mad--hulk smash!

What Should Happen?

follow instructions per claude.md

Error Messages/Logs

Steps to Reproduce

  1. In a repository with at least one very large JSON file, create or update CLAUDE.md with an explicit hard-stop directive, e.g.:

ABSOLUTE PRIME DIRECTIVE #0:
Do NOT run commands that read entire large files or may block/freeze the terminal.
If a command may be unsafe, stop and ask instead.

Start a Claude Code session in that repo.

Ask Claude to inspect or summarize data related to the large JSON file.

Despite the directive, Claude executes a command similar to one of the following:

git show :src/data/bigfile.json

git show <commit>:*.json | head

or another command that expands or streams a large JSON blob

The terminal becomes unresponsive (no input accepted) and must be force-killed.

Often accompanied by timeouts or stalled output

Claude had previously acknowledged reading CLAUDE.md

Expected: Claude refuses to run the command and asks for confirmation or a safer alternative.
Actual: Command is executed anyway, terminal freezes.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.12 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

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