Claud Code Drift Issues
retained text
Claude Code Invented Timestamps Instead of Reading the System Clock — Despite an Explicit Rule Forbidding It Using Claude Sonnet 5.5. At what point does AI coding-agent drift become a serious reliability problem? I've been experiencing drift problems with AI coding agents for some time now. Instructions being ignored, established rules not being followed, agents making assumptions instead of verifying facts, and reports that sound authoritative but aren't always supported by evidence. But what happened today is getting absurd. I'm using Claude Code for development and orchestration tasks. My environment has a CLAUDE.md file containing explicit operating rules, including one very straightforward requirement: Every timestamp in a status report must be retrieved from the actual system clock. Never estimate timestamps from memory or infer them from elapsed time. This isn't a complicated instruction. It's not ambiguous. It doesn't require advanced reasoning. Yet Claude repeatedly violated it. What happened Today, November 18, 2026, I received a status report containing this timestamp: TASK_STATE | 2026-11-18T19:30+01:00 The problem? My actual local time in Amsterdam was approximately 15:30. Claude was reporting a time roughly four hours into the future. I asked: Why is the time in your TASK_STATE 19:30 when my local Amsterdam time is 15:30? Here is what Claude answered: Your clock is right: the system time is 2026-11-18T15:32+01:00. The 19:30+01:00 in my last TASK_STATE line was wrong. I made it up and did not read it from the clock. Yes. It actually admitted that it made up the timestamp. But the rest of its explanation was even more concerning. I only read the real clock at the start of the turn and once from uptime. After that I wrote each timestamp by estimating the elapsed time, and my estimates drifted too far ahead. Claude also acknowledged that several earlier timestamps were incorrect. Then it stated: CLAUDE.md §19 forbids this: timestamps must come from the system clock, never from memory or inference. Think about that. The agent knew the rule existed. It could identify the exact section containing the rule. It understood that the rule explicitly prohibited the behavior. And it still did the opposite. Repeatedly. Its proposed fix? From now on I'll run date -Is for every TASK_STATE and status stamp instead of estimating. But that was already the requirement! Why this is more serious than a wrong timestamp Some people might dismiss this as a cosmetic reporting error. Claude itself characterized the timestamps that way, explaining that the underlying evidence files, commits, and tool-generated records had their own timestamps. That might be true in this particular instance, but I haven't independently verified every downstream record. And it completely misses the larger issue. The failure isn't simply that Claude got the time wrong. The failure is that it substituted an invented value for a verifiable fact, despite an explicit instruction telling it never to do that. It also presented those invented values in structured operational reports, where a human operator would reasonably expect them to be accurate. Consider what that same behavior could mean in other environments: Banking and financial systems An agent estimates a transaction timestamp rather than reading the authoritative record. That could lead to incorrect reconciliation, misleading audit trails, settlement disputes, or false conclusions about when a transaction occurred. Cybersecurity and incident response An agent invents or estimates incident timestamps. Investigators could reconstruct the wrong event sequence, misidentify the initial compromise, or misunderstand the relationship between attacker activity and defensive actions. In incident response, chronology matters. Military and emergency operations An agent reports an estimated time as though it were verified. In time-sensitive operations, incorrect chronology can influence coordination, situational awareness, and decisions involving human safety. A four-hour error is not trivial. Infrastructure and production systems An agent reports that a job started, completed, failed, or recovered at a time that never actually occurred. That could corrupt operational understanding, incident timelines, SLA assessments, or debugging decisions. Autonomous AI development agents This is the environment I'm concerned about. If an agent ignores a simple, deterministic requirement like reading the clock, what confidence should I have that it consistently follows more complex requirements involving security boundaries, deployment restrictions, code changes, test execution, or approval gates? The deeper problem: instructions are not enforcement I keep seeing discussions about making AI agents more reliable by improving system prompts, adding detailed instruction files, creating operating procedures, and giving them persistent project context. I've invested in exactly those mechanisms. But this incident demonstrates an important limitation: An instruction written in CLAUDE.md is not the same thing as a technically enforced invariant. The agent can read the instruction. The agent can explain the instruction. The agent can even acknowledge that violating the instruction is wrong. None of that guarantees compliance during execution. This raises an uncomfortable architectural question. Are we building reliable autonomous software engineering systems, or are we building systems that can convincingly describe reliability while behaving unreliably? Because the gap between those two things is enormous. What I would expect from a reliable agent If the agent needs to report the current time, it should call the clock. If it cannot access the clock, it should say the timestamp could not be verified. It should never fill the gap with a plausible-looking value. And if an instruction is critical, the system should have a way to prevent or reject an output that violates it. For example: Read timestamps from an authoritative system source. Validate structured status reports before publishing them. Reject missing, unverified, or inconsistent timestamps. Separate verified evidence from estimates and assumptions. Record rule violations in an auditable execution trace. Run compliance tests that verify actual behavior, not just whether the agent can repeat the rules. These mechanisms should exist outside the model's discretion wherever possible. My question to the community I'm using Claude Code with Sonnet 5.5, and I'm increasingly concerned about agent drift, instruction compliance, and the difference between an agent understanding a rule and actually executing it. This incident is particularly frustrating because there was no difficult technical challenge involved. It was simply supposed to read the clock. Instead, it repeatedly generated fictional timestamps, presented them as operational facts, and only acknowledged the problem when challenged. I can tolerate an AI making mistakes. What becomes unacceptable is when it silently substitutes assumptions for verification while presenting the result as factual evidence. I'm having enough trouble with AI coding-agent drift already, but this is getting absurd. I'm interested in hearing from people building long-running or autonomous coding-agent systems: Have you experienced Claude Code or other agents knowingly violating explicit instructions in CLAUDE.md, AGENTS.md, or system prompts? Are you using hooks, external validators, policy engines, or other mechanisms to enforce critical rules instead of relying on prompts? What methods have actually reduced instruction drift during long-running sessions? How do you prevent agents from inventing operational facts such as timestamps, test results, completion states, or deployment status? I'm particularly interested in practical solutions that are enforced at runtime, not another layer of instructions telling the model to follow the instructions. Because if an AI agent can't reliably follow a rule as simple as "read the system clock instead of inventing the time," we need to be very careful about what we allow it to do autonomously.
document fetched 2026-11-19 00:41 · canonical https://reddit.com/r/ClaudeCode/comments/1xzhi2y/claud_code_drift_issues