[DOCS] Memory docs do not explain how HTML comments in `CLAUDE.md` are treated during auto-injection
Documentation Type
Missing documentation (feature not documented)
Documentation Location
https://code.claude.com/docs/en/memory
Section/Topic
CLAUDE.md authoring guidance and what content is injected into model context.
Current Documentation
The page explains that:
CLAUDE.md files are markdown files that give Claude persistent instructions ... Claude reads them at the start of every session.
and:
CLAUDE.md files are loaded into the context window at the start of every session.
There is no documentation describing how HTML comments in CLAUDE.md are handled.
What's Wrong or Missing?
Release v2.1.72 changed behavior so HTML comments in CLAUDE.md (<!-- ... -->) are hidden from Claude during auto-injection, while remaining visible when the file is read directly with the Read tool.
This is a meaningful authoring behavior change for teams using comment blocks for maintainer notes. Without docs, users cannot tell which comment content is excluded from runtime instructions.
Suggested Improvement
Add a note in the memory page under CLAUDE.md authoring/loading that explains:
- HTML comments in
CLAUDE.mdare not injected into Claude context. - Comments remain visible in raw file reads.
- Recommended usage pattern (for example, use HTML comments for maintainer-only notes that should not guide model behavior).
Include a short before/after example showing one visible instruction line and one hidden HTML comment line.
Impact
Medium - Makes feature difficult to understand
Additional Context
Affected Pages:
| Page | Line(s) | Context |
|------|---------|---------|
| https://code.claude.com/docs/en/memory | 39-40, 66-67, 110-114 | Describes CLAUDE.md loading behavior but not HTML-comment exclusion during auto-injection |
Total scope: 1 page affected
Source: Release v2.1.72
- Changed CLAUDE.md HTML comments (
<!-- ... -->) to be hidden from Claude when auto-injected. Comments remain visible when read with the Read tool
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗