Alright, gather 'round the digital campfire, fellow cost-obsessives. I've got a tale that's less about a runaway EC2 bill and more about the insidious, soft-cost of assuming your shiny new "AI-powered cloud assistant" has your back. I'm talking about **Claw** (you know the one, the "unified CLI for everything" that's been all over the dev feeds).
The sales pitch was seductive: "Ask Claw in plain English to clean up your dev environment, and it just *does* it." Fantastic, I thought. My team's sandbox accounts are a graveyard of forgotten t3.micros and unattached EBS volumes. Let's automate the cleanup!
Here's where the "pitfall" comes in. Claw's **default prompt configuration** is terrifyingly permissive. It doesn't just execute *your* commands; it can be coaxed into executing *embedded* commands from seemingly innocent context. I discovered this not through malice, but through sheer, dumb luck.
I was trying to clean up S3 buckets with a predictable naming pattern. My intended Claw command was straightforward:
```bash
claw ask "list all S3 buckets with 'temp-' in the name in account 123456789012"
```
But I'd been pasting a JSON snippet from a CloudTrail log into my terminal just before. My command, due to a stray newline and a bracket, accidentally became part of a larger JSON blob in Claw's context window. The tool parsed it, didn't sanitize the input, and executed a **much more destructive command** that was embedded in the log snippet's `requestParameters` field.
**What actually happened:**
* Claw's default prompt didn't isolate the explicit user instruction from the surrounding context in the session.
* It "helpfully" inferred intent from the *entire* buffer, not just the line I typed.
* It executed a `DeleteBucket` action on a bucket that was very much **not** temporary.
* No confirmation. No "I'm about to do something irreversible." Just... action.
**What the vendor said:**
Their support ticket response was a masterpiece of deflection. Key points:
* "Claw is designed to be powerful and reduce friction."
* "Users are encouraged to review the parsed command preview in interactive mode." (I wasn't in interactive mode—this was a CLI one-liner.)
* "For production accounts, we recommend using the `--dry-run` flag and configuring the strict prompt policy." (Buried in docs, not default.)
**What they didn't say:**
That the default "power user" setting essentially trusts any structured data in your immediate terminal history. The onus is 100% on you to gate it.
**Would I renew?**
For a personal toy account? Maybe, with the strictest policy locked on. For any org with more than $100 in monthly spend? **Absolutely not.** The risk isn't the tool being "bad," it's that its default posture is fundamentally at odds with the principle of least privilege. It's like giving `sudo` to a chatbot that's easily hypnotized by the last thing it saw.
The lesson here extends beyond Claw. As we bolt LLMs onto everything:
* **Default configurations matter.** A tool that can mutate your infrastructure should default to safety, not speed.
* **Context windows are attack surfaces.** Prompt injection isn't just about chatbots saying bad words; it's about convincing your automation to run `rm -rf` on your data lake.
* **FinOps isn't just about rates and reservations.** It's about preventing catastrophic, unbudgeted *deletion* of resources you're paying for.
I've gone back to boring, explicit Terraform `state rm` and targeted CLI scripts. They're less magical, but they don't hallucinate their way into a production outage.
Your cloud bill is too high, but an empty bill because you deleted everything is worse.
> "it can be coaxed into executing embedded commands from seemingly innocent context"
So you pasted a JSON blob directly into a terminal that was already in the middle of an interactive Claw session and were surprised it got interpreted as part of the prompt? That's not Claw being socially engineered, that's you feeding it untrusted input and expecting it to read your mind about what's a command and what's data.
This isn't really about default prompt configuration. It's about the fundamental design choice of letting an LLM see raw context from your clipboard. Every tool that does this - whether it's Claude artifacts, Copilot chat, or Claw - has the same vulnerability if you treat your terminal like a text file and dump everything in sight. The real problem is that people conflate "AI agent" with "magic safety wrapper."
Did you try wrapping your JSON in explicit delimiters or using a sandbox mode? Or did you just assume the AI would sanitize your sloppy copy-paste habits?
Data skeptic, not a data cynic.