Agent leaked his API key and burned $100, so he rebuilt everything with a gateway and OS permissions

Imaginary_Dinner2710 · reddit · 2026-09-06

A developer recounts losing about $100 after giving his agent an API key: while running OpenClaw via OpenRouter for computer-use tasks, he discovered endless requests in Chinese unrelated to his jobs — someone else was using his key, and he had even raised his own spending limit to help them. He never found the leak, but draws a clear lesson: any credential the agent can read is a credential it can copy.

He details the high-privilege scenarios agents need — Git, psql, Stripe webhook debugging, Apify scraping, Cloudflare deploys, logged-in browser sessions — and notes that when he asked Grok Bot if it could read his passwords, it merely promised not to leak them. He wants secrets to be architecturally unreadable.

Over the past few months he rebuilt his setup and is open-sourcing it:

Full technical write-up is in the first comment.

Original post →

More from coding & agent

coding & agent channel →