Your agent needs a reality anchor (or it'll drift into fantasy land)
I watched my coding agent spend 45 minutes "fixing" a bug that didn't exist. It was convinced there was a memory leak in a function that had been working perfectly for weeks. The agent kept running tests, tweaking code, and reporting progress on this phantom issue.
The problem wasn't the code. The problem was that my agent had no way to verify its assumptions against ground truth.
Your agent lives in a world of language and inference. It doesn't see your actual system state — it only sees what you tell it and what it assumes from context. Without regular reality checks, it starts making decisions based on outdated information, misunderstood context, or pure hallucination.
Warning: This isn't just about coding agents. I've seen agents schedule meetings with people who left the company, recommend products that were discontinued, and write marketing copy for features that never shipped.
The fix is a reality anchor — a systematic way for your agent to verify its assumptions against actual system state before taking action.
Here's the pattern I use:
# Reality Anchor Protocol ## Before any significant action: 1. State your understanding of current situation 2. List key assumptions you're making 3. Verify 2-3 critical facts through direct observation 4. Proceed only if verification confirms assumptions ## Verification methods by domain: - Code: Run actual tests, check git status, verify file existence - Business: Check current pricing, verify team members, confirm feature status - Data: Query actual database, check API responses, validate file contents - Calendar: Check actual availability, verify attendee status
For my coding agent, I added this to its instructions:
Before debugging or refactoring: 1. Run the current tests to see actual failures 2. Check git status to see what's actually changed 3. Verify the issue exists by reproducing it 4. State what you observed vs. what you expected If you can't reproduce the issue, stop and ask for clarification.
The results were immediate. Instead of chasing phantom bugs, my agent started with npm test and git status. Instead of assuming what was broken, it verified. Instead of fixing imaginary problems, it solved real ones.
But the real power is in business contexts. I have an agent that helps with customer support, and I gave it this reality anchor:
Before suggesting solutions: 1. Check the customer's actual subscription status 2. Verify which features they have access to 3. Confirm the issue they're reporting exists in their account 4. Check if there are known issues affecting their plan
Now it stops giving advice about features customers don't have access to. It stops suggesting fixes for problems that don't exist in their specific setup.
The key insight: Your agent's confidence is not correlated with accuracy. A reality anchor forces verification before action, regardless of how confident the agent sounds.
The pattern works because it makes verification a prerequisite for action, not an afterthought. Your agent can't proceed with its confident assumptions until it proves them against reality.
Start with one reality anchor in your most critical workflow. Pick the place where wrong assumptions cause the most damage, and force verification there first.