Using CLAUDE.md Instructions as a Context Health Check
A technique to verify Claude is following your system instructions by adding a specific naming requirement and monitoring compliance.
Is Claude Still Listening? A Simple Trick to Monitor Context Health in Real Time
Originally inspired by a Reddit tip shared by @vista8
If you've spent serious time building with Claude — whether through the API, Claude Projects, or custom OpenClaw skills — you've probably run into this frustrating scenario: your agent starts behaving oddly, ignoring constraints you set, or drifting away from the persona you carefully defined. But you can't quite pinpoint when it happened or why.
There's a surprisingly elegant fix hiding in plain sight, and it's borrowed from one of rock history's most famous contract riders.
The Van Halen Trick: A Canary in the Coal Mine
In the 1980s, the rock band Van Halen famously included a clause in their performance contracts demanding a bowl of M&Ms backstage — with all the brown ones removed. At first glance, it sounds like pure rockstar excess. But the real reason was far more pragmatic: it was a compliance test.
Their contracts were hundreds of pages long, packed with technical safety requirements for stage rigging, electrical loads, and venue specifications. If promoters missed the brown M&M clause, Van Halen knew the contract hadn't been read carefully — and the technical specs were probably ignored too. A trivial detail became a powerful signal.
The same principle applies perfectly to Claude's context window.
Developer @vista8 surfaced a technique from a Reddit thread that applies this exact logic to CLAUDE.md:
Add an instruction like: "Always address me as [YourName] in every response."
If Claude suddenly stops using that name — you know it's started ignoring your
CLAUDE.md. Time to reset the context.
It's deceptively simple. And genuinely useful.
Why Context Drift Happens (and Why It Matters)
To understand why this trick works, it helps to understand the mechanics of context window degradation in large language models.
Claude, like all transformer-based LLMs, operates within a finite context window. Every message, every tool call, every output token consumes space. As your session grows longer:
- Earlier instructions get "pushed back" in the attention window
- System prompts and
CLAUDE.mdcontent can receive proportionally less attention - Instruction following becomes inconsistent, especially for subtle formatting or behavioral rules
- Compounding tool calls in agentic workflows exacerbate this effect dramatically
This is especially critical in long-running automation pipelines, Claude Projects with extensive histories, or multi-step OpenClaw skill chains where Claude is expected to maintain consistent behavior across dozens of sequential actions.
The problem isn't that Claude "forgets" — it's that the model's effective attention to early-defined constraints dilutes over time. And because this happens gradually, it's notoriously hard to detect. You might only notice when something significant breaks, by which point many intermediate outputs are already compromised.
A simple, persistent instruction like a naming convention acts as a continuous, low-cost health check — a canary that stops singing the moment context degradation sets in.
How to Implement This in Your CLAUDE.md
Here's how to put this into practice. The implementation is intentionally lightweight — the goal is a rule that's easy to follow when Claude is reading your instructions, and impossible to miss when it's not.
Basic Implementation
Add the following to your CLAUDE.md file:
## Communication Rules
- Always address me as **[YourPreferredName]** at the start of every response.
- This naming convention must be maintained throughout the entire session.
Replace [YourPreferredName] with something specific and unique — your username, a project codename, or even something deliberately unusual like "Captain" or "Dev-7". The more distinctive, the better. Common words are easier for the model to accidentally include; a specific, unusual name stands out clearly when it's absent.
Enhanced Version for Agentic Pipelines
For more complex workflows or OpenClaw skill integrations, consider a slightly more robust version:
## Session Integrity Check
- Address me as **[ProjectCodename]** in every response, without exception.
- If you are ever uncertain whether you should include this name, include it.
- The presence of this name in your response confirms you have read and are
following all instructions in this document.
This version explicitly frames the naming convention as a confirmation signal, which subtly reinforces its purpose in the model's response generation.
Monitoring in Practice
Once this is in place, your workflow becomes:
- Start a session → Claude addresses you by name ✅
- Work through a long task → Name still present ✅
- Claude stops using the name → 🚨 Context health warning
- Action: Start a new session, re-inject your
CLAUDE.md, or use a context compaction strategy
In agentic settings, you can even automate this check. If you're building an OpenClaw skill or custom API wrapper, parse the first sentence of Claude's response and verify the expected token is present. Treat its absence as a trigger to reset or re-inject context.
def check_context_health(response: str, expected_name: str) -> bool:
"""
Simple context health check for Claude API responses.
Returns False if the expected name is missing, indicating
potential context window degradation.
"""
return expected_name.lower() in response[:200].lower()
# Usage
if not check_context_health(claude_response, "Dev-7"):
print("⚠️ Context drift detected. Re-injecting system prompt...")
reinject_system_prompt()
Beyond Naming: Expanding the Pattern
Once you internalize the logic, you can apply it more broadly. The naming convention is just one example of what you might call a persistent compliance marker — a rule that's easy to verify programmatically or visually, and whose violation signals larger instruction drift.
Other patterns worth considering:
- Response format markers: Require every response to end with a specific tag like
[END-OK] - Section headers: Mandate a fixed first section title like
## Status Checkin every structured output - Token anchors: Ask Claude to always begin reasoning blocks with a specific phrase
- Emoji flags: Require a specific emoji (e.g., 🔷) at the start of each message — unusual enough to notice when missing
Each of these serves the same function: a lightweight, continuous signal that your CLAUDE.md or system prompt is still actively influencing the model's behavior.
The key design principle is the same as Van Halen's: choose something trivial enough that compliance costs nothing, but specific enough that non-compliance is immediately obvious.
Conclusion: Small Rules, Big Signal
The elegance of this technique is that it costs almost nothing to implement but gives you something genuinely valuable: observability into your own context window.
For developers building production-grade Claude integrations, agentic pipelines, or OpenClaw skills, this kind of low-overhead health check is exactly the sort of operational practice that separates brittle demos from reliable systems. You're not just hoping Claude follows your instructions — you're verifying it continuously, with every single response.
Add it to your CLAUDE.md today. Pick a name. Make it unusual. And the next time Claude stops calling you by it, you'll know exactly what's happening — and exactly what to do.
TL;DR: Add a unique naming instruction to your CLAUDE.md. If Claude stops using it, your context window is drifting and it's time to reset. It's the brown M&M test for LLM context health.
Found this useful? Share it with your team, and check out more Claude tips and OpenClaw skill guides on ClawList.io.
Original insight by @vista8 on X
Tags
Related Articles
Vercel's React Best Practices as Reusable Skill
Vercel distilled 10 years of React expertise into a skill, demonstrating how organizations should package internal best practices as reusable AI agent skills.
Building Commercial Apps with Claude Opus
Experience sharing on rapid app development using Claude Opus as a CTO, product manager, and designer combined.
AI-Powered Product Marketing with Video and Social Media
Guide on using AI to create product advertisement videos, user testimonials, and product images for social media marketing campaigns.