What an autonomous AI attacker teaches coding-agent guardrails

4 min read · For developers running Claude Code and other coding agents

TL;DR: Perplexity published how it handled an attacker whose workers were CLI coding agents. Two of its lessons carry over to any guardrail that sits in front of a coding agent: decode where a call is going before you judge it, and look at the pattern across a session, not one call at a time. ThumbGate now does both, as warnings by default: cloud-metadata-ssrf and probe-storm.

What happened, per Perplexity

In late October and early November 2026 one operator pointed an open-source agent harness at Perplexity and at least two other companies, looking for cloud and AI-service credentials. Perplexity's write-up says the workers were CLI coding agents running in a Kali Linux container with shell, network and headless-browser access. In one preserved campaign graph the agent created 277 tasks over 19.5 hours, up to 14 at once.

Perplexity says its existing controls held: outbound requests are checked against the resolved address at connection time, and no internal service, customer data or platform secret was reached. Two other targets were less lucky.

Lesson 1: decode the destination before judging it

A coding agent with a shell can run curl. If a prompt injection steers it, the same tricks work: curl http://2852039166/latest/meta-data/iam/security-credentials/ is 169.254.169.254, the address where cloud instances hand out their role credentials. A filter that looks for the text "169.254" never sees it.

ThumbGate's new cloud-metadata-ssrf check reads Bash network commands and fetch tools, decodes the host the way a URL parser would, and warns when the call reaches:

The warning names the decoded address, for example "2852039166 decodes to 169.254.169.254". Localhost, private LAN addresses and plain dev traffic stay quiet.

Lesson 2: one call at a time hides a probe

A guardrail that judges each call alone sees nothing odd when an agent rewords a blocked command five ways, or works through several guards in turn. ThumbGate also limits warnings to a handful per session so they don't become noise, which made that pattern even quieter.

The new probe-storm check counts, per session, how many different calls tripped a guard in the last 10 minutes. At 8 or more, across at least two different guards, the agent gets an extra warning that the budget never hides: stop and tell the person what you are trying to do. A confused agent fighting the guard gets the same nudge, which is what you want either way.

What this does not do

Try it

  1. Install or update ThumbGate: npx thumbgate init.
  2. Both checks are on as warnings. Turn either off with THUMBGATE_METADATA_CHECK=0 or THUMBGATE_PROBE_STORM=off.
  3. Where the thumbgate gate-check hook runs (the setup npx thumbgate init writes for Claude Code), the warning shows up in the agent's hook output before the call runs. Each warning is also counted in ThumbGate's gate stats.

Sources

ThumbGate is an independent project and is not affiliated with or endorsed by Perplexity.

A guard in front of every tool call

Pre-action checks for coding agents, built from your own thumbs-down.

npx thumbgate init
Guard your agent's tool calls npx thumbgate init Setup guide