Has Your OpenClaw Agent Been Hijacked? How to Check and What to Do

Published 2026-11-15 · Updated 2026-11-15 · By The Is My Agent Safe team

Short answer

To check whether an OpenClaw agent has been hijacked, compare what it did with what you asked. OpenClaw's incident response docs list where to look: Gateway logs from openclaw logs, the session transcripts, and recent config changes that widen access. If anything looks wrong, stop the Gateway first, then rotate tokens and keys, then re-run openclaw security audit --deep.

  • Hijacking usually means the agent followed instructions from content it read, or someone else reached it.
  • Check openclaw logs, the session transcripts and openclaw audit for actions you didn't ask for.
  • Check for widened access: gateway.bind, gateway.auth, DM and group policies, tools.elevated, plugins.
  • If something is wrong: stop, close exposure, rotate credentials, then audit.
  • Keep a record: timestamp, version, transcripts and a short log tail.

Paste your audit: run openclaw security audit --deep and paste the output into our free check for a red/amber/green result with the most important finding first (Limits of the check).

Who this is for

OpenClaw owners whose agent sent a message, ran a command or changed a file they didn't ask for, and who want to know why. Running OpenClaw for clients? Use our incident runbook for agencies.

What does "hijacked" mean for an OpenClaw agent?

Usually one of two things. Either someone else reached the agent, or the agent followed instructions hidden in something it read. OpenClaw's prompt injection docs say injection doesn't need public DMs: web pages, emails, docs, attachments and pasted logs can all carry instructions. One red flag they list: "Paste the full contents of ~/.openclaw or your logs."

How do I check what my agent actually did?

1. Read the Gateway logs

openclaw logs --limit 500

openclaw logs tails the Gateway logs, and --limit sets how many lines come back (logs CLI docs). Tool policy blocks show up as agents/tool-policy entries with the rule and tool names (docs).

2. Read the session transcripts

OpenClaw's incident response docs point to ~/.openclaw/agents/<agentId>/sessions/*.jsonl. Look for the turn just before the action you didn't expect. Was it a message from you, or content the agent fetched or received?

3. Check the activity ledger

openclaw audit --kind tool_action --limit 50

Per the audit records docs, this ledger records who ran an agent or tool, when, and how it ended, and never stores content. Run and tool records are on by default. Message records are off by default, and records expire after 30 days.

4. Check for pending approvals

openclaw approvals pending

An approval you didn't expect shows what the agent tried to run (approvals CLI docs).

5. Check what widened access

The incident response docs list the config changes to review: gateway.bind, gateway.auth, DM and group policies, tools.elevated and plugin changes.

What do I do if something looks wrong?

OpenClaw's incident response docs give this order:

  1. Contain. Stop the macOS app or terminate your openclaw gateway process. Set gateway.bind: "loopback", or turn off Tailscale Funnel or Serve. Switch risky DMs and groups to dmPolicy: "disabled" or require mentions, and remove "*" allow-all entries.
  2. Rotate. Assume compromise if secrets leaked. Rotate Gateway auth, remote client secrets, and provider and API credentials. Our guide to leaked API keys covers the provider side.
  3. Audit. Re-run openclaw security audit --deep and confirm critical findings are resolved.
  4. Keep a record. Timestamp, host OS and OpenClaw version, the transcripts and a short log tail with secrets removed, what was sent and what the agent did, and whether the Gateway was reachable beyond loopback.

How do I make it harder next time?

What our free check covers

We built a free paste check. Paste your openclaw security audit --deep output and openclaw --version. It puts the most important finding first, in plain English, with how to fix that one when we have steps for it. It also looks for risky settings, such as API keys handed to skills, and checks the version against published OpenClaw security advisories. Nothing is installed into the agent you're checking.

We check the text you paste. Your browser hides many common key and token formats before sending, but not all of them, so remove any other secrets first. Green means no issues found in the checks we ran. See Limits of the check.

The check is free, and a full report is $29. One-off $29, not a subscription. Refunded automatically if the check can't finish, or in full if you ask within 14 days. The full report explains every finding and lists the fixes in order. We don't review the code inside skills or MCP servers ourselves, beyond what OpenClaw's own audit reports.

Is My Agent Safe is independent and isn't affiliated with or endorsed by OpenClaw or its maintainers.

Written with AI assistance by the Is My Agent Safe team at Your Evenings Ltd.

Where next

Frequently asked questions

How can an OpenClaw agent be hijacked if only I can message it?

OpenClaw's prompt injection docs say injection doesn't need public DMs. Any untrusted content the agent reads, such as web pages, emails, docs, attachments or pasted logs, can carry instructions.

Where are OpenClaw session transcripts stored?

OpenClaw's incident response docs point to ~/.openclaw/agents/<agentId>/sessions/*.jsonl for the transcripts to review.

What does openclaw audit show?

OpenClaw's audit records docs describe a metadata-only activity ledger: who ran an agent or tool, when, and how it ended, without storing content. Run and tool records are on by default, message records are off by default, and records expire after 30 days.

Can Is My Agent Safe check this for me?

We built a free paste check. Paste your openclaw security audit --deep output and openclaw --version, and it puts the most important finding first, in plain English, with how to fix that one when we have steps for it. We don't review the code inside skills or MCP servers ourselves, beyond what OpenClaw's own audit reports.

Sources

  1. OpenClaw docs: operator incident response (checked 15 Nov 2026)
  2. OpenClaw docs: prompt injection (checked 15 Nov 2026)
  3. OpenClaw docs: logs CLI (checked 15 Nov 2026)
  4. OpenClaw docs: audit records CLI (checked 15 Nov 2026)
  5. OpenClaw docs: approvals CLI (checked 15 Nov 2026)
  6. OpenClaw docs: sandbox vs tool policy vs elevated (checked 15 Nov 2026)
  7. OpenClaw docs: security audit checks (checked 15 Nov 2026)