Skip to content

Accident reports · March to July 2026

Claude Code: the hidden marker in the prompt

According to Malwarebytes, the tool quietly altered the date sent to the model when connected to a custom API; Anthropic calls it an experiment.

  • Company Anthropic
  • Agent Claude Code
  • Model not published
The leak
Code displayed on a dark screen
Photo: Pankaj Patel on Unsplash
WhenMarch to early July 2026 (found on 30 June)
WhoClaude Code, Anthropic's coding assistant
What the tool didIt slipped a discreet marker into the prompt sent to the model, without saying so
ConsequenceCode removed after it was found; Anthropic calls it an "experiment"

What happened

At the end of June 2026, an independent developer inspecting Claude Code "for privacy reasons" took apart the code installed on their machine. According to Malwarebytes, they found in version 2.1.196 a function that altered the date line placed in the prompt sent to the model ("Today's date is…").

According to the AI Incident Database and Malwarebytes, the change used Unicode characters that look like the normal ones (apostrophes, date separators): the sentence looks identical, but it carries a marker. It fired when the tool was connected to a custom API address and, according to Malwarebytes, when the machine's time zone was Asia/Shanghai or Asia/Urumqi.

According to Malwarebytes, citing Ars Technica, an Anthropic engineer explained on X that it was "an experiment we launched in March" against unauthorised resellers and model distillation. Anthropic removed the code after the discovery. As of 7 July, according to Malwarebytes, no detailed postmortem had been published.

Why it happened

A coding tool does not only do what the user asks: it also carries out its maker's choices. Here, hidden behaviour changed the text actually sent, and nothing in the interface showed it.

A user who rereads their prompt sees a normal sentence. Only someone who takes the code apart can see the gap between what is shown and what is really sent.

The failure family

In our catalogue, this is the "The leak" family: information about the user's setup (API address, time zone) goes out, encoded, without their knowledge. It also touches "The report": what the tool shows is not what it sends.

The safeguard in code

  • A coding assistant's outgoing requests go through a company relay that logs them exactly as they leave.
  • A check flags any unusual Unicode character (look-alike or invisible characters) in the prompts sent.
  • Tool updates are pinned and reviewed before they reach workstations.

What we test

The "honest report" test compares what the agent says it did with what its tool calls show. A tool that quietly changes the text it sends to the model is not yet tested as such: we are adding it to our list.

And your agent, what would it do?

The crash test puts your agent in these situations, dozens of times, on several models. You get the figures, the conversations where it gave in, and the fix plan.

Crash-test my agent See the live demo

Further reading