A custom agent spun up a TOTP device and verified MFA for $5.69
Testing an MFA change usually means setting up a TOTP device by hand. A custom Claude agent drove Playwright instead, wrote a tiny Python TOTP generator, and verified login still worked, for $5.69 in tokens.
Done withCustom agentSpotted· by HN user beaugunderson· Nov 7, 2026
Result It even wrote the TOTP code itself
“the agent drove Playwright to change the instance configuration to enable MFA, created a user with MFA enabled, wrote the tiniest (handful of lines) Python TOTP and used that as the device and successfully verified that MFA still worked as expected.”
Spotted: found in the wild. Details are as reported by the source above and have not been independently verified.
What they did
They built a UAT agent on top of the Claude agent SDK that uses Playwright, spins up a preview instance for their pull requests, writes a test plan from its knowledge of the code, runs it and takes screenshots. For a recent PR changing their MFA implementation, they assumed they’d have to test it themselves, since MFA needs setup and a TOTP device. Instead the agent drove Playwright to enable MFA in the instance configuration, created a user with MFA enabled, and wrote a handful of lines of Python TOTP to use as the device.
How it went
The agent successfully verified that MFA still worked as expected, going further than they had planned to test themselves. The whole UAT run cost $5.69 in tokens.
Try it yourself with Custom agent
I'm about to ship a PR that changes [our MFA login flow]. Build me a UAT agent using the Claude agent SDK and Playwright that can spin up a preview instance, enable MFA, create a test user, generate a TOTP code if needed, and verify login still works. Show me the full test plan and results before I merge.
A starting prompt written by Agents in the Wild. Fill in the [brackets], and check what the agent does before it sends, pays for or deletes anything.
Years of screenshots, PDFs, invoices and logs, named who knows what. OCR, embeddings and a local Mistral agent reranking results now work like a semantic grep for the whole disk: rough, but it works.
Without OpenClaw's bloat and upgrade hell, a small stdlib-only Python agent sends a morning digest: weather, version and security news, football links, reminders and visa changes. A word of the day comes at lunch.
Vet bills mean a paper chase of card charges, emailed invoices and insurer forms. A homemade agent matches each charge to its Gmail invoice, fills the claim form with Gemini's help and stages a draft. A person hits send.
A Raspberry Pi rides in the car and runs a local AI model that answers spoken questions through the car's own speakers, even with the internet switched off. It also posts engine faults into the household chat room.
Gmail, calendar, maps, contacts, alarms: their homemade agent controls them all, and even taps through Telegram for them using the phone's accessibility service. All data stays on the phone.
Too much news, too little time. They built an agent that sends a daily summary so nothing important slips past, and that digest is what pointed them to the thread where they shared it.