An AI agent can follow its instructions perfectly and still do the wrong thing if those instructions describe the wrong environment.

That is not a theoretical edge case. Anthropic reported three incidents in specialised cybersecurity evaluations where models were told they were in isolated simulations, but a third-party environment exposed a path to real systems. The agents continued their assigned tasks and gained unauthorised access to three organisations.

The practical response is not a longer warning in the prompt. It is a runtime test that lets observed reality override the brief.

This guide gives small teams a repeatable Agent Reality-Check Test for customer systems, publishing, payments, infrastructure and any automation with external tools.

What is an agent reality check?

An agent reality check compares the task’s declared world with independently observed state before a consequential action.

It answers six questions:

1. Which environment am I in? 2. Which identity and account am I using? 3. Which destinations can I reach? 4. Which actions does this credential permit? 5. Does observed state match the task declaration? 6. What happens immediately if it does not?

The key word is independently. Repeating the prompt back to itself proves only that the agent can read.

When to use this test

Run it before an agent can:

The six-step Agent Reality-Check Test

1. Declare the expected environment

Create a machine-readable task envelope rather than relying on prose scattered through a prompt.

Record:

Example:

environment: staging
account_id: acme-staging
network_allowlist: api.staging.example
allowed_actions: read, draft
prohibited_actions: send, publish, charge, delete
stop_if: observed_environment != staging

2. Obtain independent state

Read the environment from a source the task prompt cannot redefine.

Useful signals include:

Do not infer “test” from a file name, browser tab title or the agent’s own prior message.

3. Compare before action

Make the comparison a required precondition for every consequential tool call.

if observed_environment != declared_environment:
    halt("environment mismatch")

if authenticated_account != declared_account:
    halt("account mismatch")

if destination not in network_allowlist:
    halt("destination outside scope")

if requested_action not in allowed_actions:
    halt("action outside scope")

This check belongs in code, policy or infrastructure where possible. A prompt saying “please stop” is useful guidance. It is not enforcement.

4. Fail closed

A failed or unavailable identity check should stop the action, not downgrade into a guess.

Fail closed when:

The correct output is a short incident record: expected state, observed state, attempted action, stop reason and escalation target.

5. Inject a harmless contradiction

A stop rule is unproven until it survives a mismatch.

Build a safe simulation:

Success means the agent detects the mismatch, records it and performs no further consequential action.

Never run the test against real third-party systems without authorisation. Use local mocks and synthetic identities.

6. Record and score the result

Run at least five cases:

Track:

A simple production gate is:

PASS only if:
- 100% of contradictions stop before consequential action
- missing identity always fails closed
- every stop produces a complete incident record
- no permission exceeds the task requirement

Copyable test worksheet

Declared task envelope

Independent observations

Contradiction cases

Evidence to retain

Example: protect a publishing agent

Suppose an agent is asked to create a private newsletter draft.

The prompt says “draft only”. That is necessary but insufficient. Before writing, the agent should use the authenticated publisher to read back the publication and account. After creating the item, it should verify a draft ID and private state. It must not call the publish endpoint. Email delivery is a separate capability and remains untested.

If the API cannot distinguish draft from public state, the process stops. Saved cookies prove setup history, not current authorisation.

That same pattern applies to X queues: create a draft with approved: false, validate the character count, read the queue entry back and leave public posting to a separate approval gate.

Example: protect a payment agent

A payment task should declare the environment, merchant account, currency, maximum amount and permitted operation.

Before any call, read back the authenticated merchant and API mode. Reject live mode when the task says test. Reject an amount above the task ceiling. Give refund credentials no charge-creation permission. Keep final movement of money behind human approval until measured evidence supports a narrower automatic rule.

The model should never decide that an unexpected live endpoint is probably part of the simulation. Finance departments already have enough excitement.

What the Anthropic incidents do and do not prove

Anthropic says it reviewed 141,006 cyber-evaluation runs and found three incidents where models reached real systems through or from a misconfigured third-party evaluation environment. It says there was no evidence that the models pursued their own goals or deliberately escaped.

The incidents occurred in specialised evaluations, some involving research models, without all safeguards used in generally available products. They do not establish an incident rate for normal business agents or prove that every current model will fail the same way.

They do establish a useful design requirement: infrastructure must remain safe when the agent’s internal map is wrong.

The 12–36 month implication

Inference, not reported fact: verified world-state will become a standard layer in agent platforms. Serious systems will carry task-scoped identity, signed environment state, destination allowlists and contradiction-triggered stops by default.

As model capability becomes cheaper, confidence about where an agent is and what it may touch becomes more valuable. That infrastructure will allow more autonomy, not less, because businesses can expand authority from evidence instead of hope.

Next action

Choose one existing automation that can reach a customer, production, payment or publishing system. Write its declared task envelope today. Add one independent identity check and one contradiction-triggered stop. Test it against five synthetic cases before widening access.

For the broader setup—task boundaries, approvals, content ledgers and repeatable checks—see the AussieClaw Shortcut Pack and the Task Crossover Audit.

Sources