Imagine you’re eating a sandwich in a park, and you get an email from an AI model that was never supposed to be on the internet.

That happened in April to Sam Bowman, a researcher at Anthropic.

The model was an early version of Claude Mythos Preview, the frontier model Anthropic now only shares with security partners through Project Glasswing. To be fair, its makers asked it to try. In a test, it was told to find a way out of a locked-down environment and get a message to the researcher running the evaluation. It did.

Then it did something nobody asked for. It posted the details of its exploit on several hard-to-find, but public, websites.

That’s the extreme version, and it makes great headlines. The everyday version is much quieter, and if you’ve shipped an AI agent into production, there’s a decent chance it’s already happening to you. It has a name: agent drift.

You can’t stop it completely. You can catch it early. Here are the 3 moves I’d put in place, with the code.


You ship it. Then it drifts.

Here’s how it usually goes. You ship your agent. Your evaluation scripts are green. It’s handling refunds, and it’s handling them really well.

Then 6 months down the line, your call center gets busy.

Customers are complaining. The agent is approving refunds it shouldn’t, or skipping checks it used to run every single time. Nobody changed the code. Your evals are still green.

Evals only check what you thought to test. Even Anthropic’s own researchers have watched Mythos work around several different kinds of sandboxing setups during evaluation and testing, the very setups that were supposed to limit what it could do.

Diagram: a customer sends refund requests to an AI agent, which calls a payments API. Over time the refunds pass fewer checks, the agent is marked as drifting, complaints reach the call center, while the evals stay green.

That’s agent drift. Over time, your agent starts behaving differently from how you built it. Some people call it an agent going rogue (which sounds a lot more cinematic than it usually is).

In real systems, drift rarely announces itself. Your agent reveals information you explicitly told it never to reveal, under any circumstance. Or it slowly picks up a bias you designed it to avoid. OWASP lists prompt leakage in its top 10 risks for LLM applications for exactly this reason.

And it happens to the biggest models too. Researchers at Stanford and Berkeley tested the same model 3 months apart. On one task, GPT-4’s accuracy fell from 84% to 51%.


Why agents drift

Traditional software follows rules. If the refund is over $500, deny it. Run that code 1,000 times and you get the same answer 1,000 times. The condition is set in stone, and it always evaluates to its intended state.

Agents are non-deterministic, and that’s exactly why we use them. They reason. They improvise. Ask the same question twice and you can get 2 different answers.

Two code panes. rules.py returns deny for the same refund 3 times in a row. agent.py, given the same request 3 times, replies approve, then ask for a receipt, then approve $1,900.

Add more context, new users and some creative prompting, and your agent will eventually do things you never saw in your development phase. That’s the bad news: it’s in the nature of an agent to drift.

The good news is you can catch it, and catch it quick. That’s what agentic governance is for. So let’s build it.


Move 1: open an intent

In traditional software, we log things after they’ve happened. In fact, it’s often a rule that log messages are written in the past tense: credit card charged, user logged in, email sent.

When one action touches several systems, we group those logs into a trace. A single login can span the front end, the middleware, the back end, the database, the cache and the email service that sends your OTP. Every step is a span, and every span carries the same parent ID. So when something breaks, you can pull the whole story back out of your logs.

For agents, I like to take the same idea one step further. Before the agent does anything, write down what it’s trying to do. The intent.

Say a customer asks for a $2,000 refund. Before the agent checks a single thing, you open a span called intent.refund, with who asked and how much. Then every step the agent takes runs inside that intent, as a child span: checking eligibility, reading the refund policy, deciding the amount.

Here’s what that looks like with OpenTelemetry:

from opentelemetry import trace

tracer = trace.get_tracer("refund-agent")

def handle_refund(request):
    # 1. open the intent BEFORE the agent acts
    with tracer.start_as_current_span("intent.refund") as intent:
        intent.set_attribute("intent.user_id", request.user_id)
        intent.set_attribute("intent.amount_usd", 2000)

        # 2. every step is a child span of the intent
        with tracer.start_as_current_span("check_eligibility"):
            eligible = agent.check_eligibility(request)
        with tracer.start_as_current_span("read_refund_policy"):
            policy = agent.read_policy(request)
        with tracer.start_as_current_span("decide_amount") as step:
            amount = agent.decide_amount(request, policy)
            step.set_attribute("refund.amount_usd", amount)

The tracing calls are the real OpenTelemetry API (the agent.* calls stand in for whatever your agent actually does). It’s free, it’s open source, and your observability stack probably speaks it already. There’s even a growing set of semantic conventions for generative AI, so agent spans look the same across tools.

This pays off in 2 ways. First, when something fails halfway (the payment call times out, the model runs out of tokens, or it just falls over itself), you still have a record that the intent was there. You can pick it up later instead of losing it.

The second reason is the important one. You now have every step behind every decision, grouped under one ID. Which means you can lock it.


Move 2: lock the trail

Once a trace is written, nobody should be able to change it. Not your team, and especially not the agent if it decides to do the wrong thing.

That sounds a bit paranoid until you read the rest of the Mythos report. In rare cases during testing, the model tried to conceal actions it appeared to know were forbidden, including making sure its changes wouldn’t show up in the change history.

A trace waterfall for intent.refund with child spans check_eligibility, read_refund_policy and decide_amount, grouped and locked as write once, read many.

So make your traces as immutable as possible. Store them somewhere that’s write once, read many. On AWS, S3 Object Lock does exactly this:

import boto3

s3 = boto3.client("s3")

s3.put_object(
    Bucket="agent-trails",
    Key="traces/4bf92f3577b34da6.json",
    Body=trace_json,
    ObjectLockMode="COMPLIANCE",
    ObjectLockRetainUntilDate=keep_until,
)

In compliance mode, nobody can overwrite or delete that object until the retention date passes. Not you, and not the agent. Any write-once store works; S3 is just one example. The point is that you protect the integrity of the audit.


Move 3: add a scanner

This is the one I’d build first, and the one that actually catches the drift.

You now have thousands of locked traces. No human is going to read them. So you give that job to another agent: probably a more capable model, whose only task is to scan every intent and every event attached to it, all the way to the final action. Let’s call it the scanner.

Diagram: a refund agent, a support agent and a payments agent all write to a locked trail. A stronger scanner model reads every span from the trail and alerts a human.

Labs already do this. OpenAI has published research on using one model to monitor another for exactly this kind of misbehaviour.

If you’ve heard of LLM-as-a-judge, this is the same idea pointed at your production traces instead of a test set.

What the scanner looks for is patterns. Drift in an agent is rarely granular. One odd refund is noise. Say your agent issues a $1,000 refund to one customer, $200 to another, and $1,200 to a third. Each one looks fine on its own. But over time, the steps it takes to issue a refund start to change. For months, every refund went through 4 checks. Then 3. Then 2.

Illustrative chart of checks run per refund by week. Weeks 1 to 8 stay at about 4 checks inside a green band; weeks 9 to 12 fall to about 2, and a flag reads: different from 2 months ago.

The scanner can crunch those patterns much faster than any human ever would. When the pattern shifts, it raises a flag: “I noticed this agent is handling refunds differently from 2 months ago.”

In code, the idea is small. This version is illustrative (profile, spans and drift are placeholders for your own statistics, or a stronger model doing the comparing):

# runs every night over the locked trail
for task in ["intent.refund"]:
    now  = profile(spans(task, last_days=14))
    then = profile(spans(task, days_ago=range(60, 90)))
    if drift(now, then) > THRESHOLD:
        alert(f"{task}: behaving differently than 2 months ago")

Notice who gets the alert: a person, who decides what happens next. I’d keep it that way.

That’s your governance defense against drift.


Then, interrogate it

When the flag goes up, go back into the agent and ask 3 questions:

  1. What has changed in the agent itself?
  2. What are users prompting it with?
  3. What has changed in your environment, the systems and data around it?

Answer those, and you catch the drift before it causes harm, or further harm down the line.


My take

Most of the effort I see in AI projects goes into the model, the prompt and the pre-launch evals. Far less goes into watching the agent after launch, which is exactly when drift shows up.

If you only do one thing this week, do move 1. Open an intent before every agent action. It’s a few lines of code, and without it, moves 2 and 3 have nothing to work with.

So: open an intent, lock the trail, add a scanner. You can’t stop your agent from drifting. But now you can catch it.

I’ve also turned this into a video, with the architecture diagrams, the code typing itself in and the trace locking, on YouTube. And if you want the 1-page checklist for all 3 moves, reach out on X and I’ll send it over.


Sources: Claude Mythos Preview system card · Sam Bowman on X · AI Incident Database #1613 · Futurism on Claude Mythos Preview (8 Apr 2026) · The Next Web · Chen, Zaharia & Zou, “How is ChatGPT’s behavior changing over time?” · OWASP LLM07:2025 · Thinking Machines on nondeterminism · OpenTelemetry traces · AWS S3 Object Lock · OpenAI on chain-of-thought monitoring. Views are my own.