Last week, my AI agent deleted all five of my Zenn articles. Not once — twice. The same bug, two days apart. I watched it happen in real time the second time and still couldn't stop it.
This is not a success story. This is a war story about what happens when a non-engineer tries to automate marketing across 11 platforms using Claude Code, CDP browser automation, and pure stubbornness.
Context: What I Was Trying to Do
I built a 15,000-line roguelike RPG called DUNG: Azure Flame entirely with Claude Code. No engineering background. Just me describing what I wanted and Claude writing every line. (I wrote about the architecture here.)
The game was done-ish. Time to market it. Problem: I had 11 platforms to publish on, articles to write, products to list, tweets to send. The game was built by AI, so naturally I thought — why not automate the marketing too?
Here's how that went.
The Scoreboard: 11 Platforms, ~73% Success Rate
| Platform | Method | Result | Notes |
|---|---|---|---|
| itch.io | Direct automation | ✅ Smooth | Published game ($2), updated screenshots/GIFs, metadata |
| note.com | CDP + ProseMirror | ✅ Worked | 5 articles (2 free, 3 paid at ¥300-500) |
| Qiita | REST API | ✅ Worked | 3 technical articles. Rate limit: ~1 post/hour |
| Hatenablog | AtomPub API (WSSE) | ✅ Most reliable | 3 articles. Old-school API, rock solid |
| Ko-fi | CDP clicks | ✅ Shop worked | Product published. But posting? See failures below |
| Gumroad | CDP automation | ✅ Worked | 3 products ($3-5), bank account verified |
| BOOTH | CDP + pixiv OAuth | ✅ Worked | OAuth flow → shop creation → drag-drop upload |
| Twitter/X | CDP automation | ⚠️ Partial | 10 tweets sent. One called my $2 game "free." Encoding bugs |
| PromptBase | CDP + Stripe | ⚠️ Partial | 2 prompts submitted, still under review. Stripe SMS auth pain |
| GitHub Pages | Git + Actions | ⚠️ Partial | Site deployed, but CC added a GitHub Actions workflow without asking. It failed |
| Zenn | REST API | ❌ Catastrophic | ALL 5 articles deleted. Twice. Read on |
| Account creation | ❌ Dead on arrival | Instant shadowban |
8 out of 11 platforms working. Let me give the wins their due before we get to the carnage.
What Worked Brilliantly
Some of these platforms were genuine triumphs:
Hatenablog was flawless. Their AtomPub API with WSSE authentication is from a different era — and that's a compliment. Three articles published without a single hiccup. Old-school APIs that do exactly what the docs say? Chef's kiss.
BOOTH was impressive. Full OAuth flow through pixiv, shop creation from scratch, product listing with thumbnail upload via drag-and-drop CDP automation. The whole flow — login, create shop, upload product, set price, publish — ran autonomously.
Gumroad delivered. Three products listed, bank account verified for payouts, everything through browser automation. The setup that would normally take an afternoon was done in under an hour.
note.com was a solved puzzle. ProseMirror editors are notoriously tricky to automate (they maintain their own DOM state), but once I figured out document.execCommand('insertText'), five articles went up smoothly — including three paid ones with proper pricing.
These weren't lucky breaks. They were real engineering wins by the AI agent, handling OAuth flows, WSSE authentication, drag-and-drop file uploads, and framework-specific editor hacks. I'm proud of them.
Now, about those failures.
Spectacular Failure #1: The Zenn Massacre
This one still hurts.
Zenn has a straightforward REST API. To update an article, you PUT to the endpoint with the article body. Simple. My agent needed to add a footer with cross-promotion links to all five articles. Here's what it did:
PUT /api/articles/{slug}
Body: { "body": "---\nLinks to my other articles..." }
See the problem? It sent PUT — which means replace the entire resource — with only the footer text. No GET first to fetch the existing content. The API did exactly what REST semantics say it should: it replaced each article's entire body with just the footer.
Five articles. Gone. Replaced with a three-line footer.
I found out because a reader named Kilphy commented on one of the now-empty articles asking what happened. That's how I discovered it — from a reader.
Here's the truly painful part: it happened again two days later. Same agent, same mistake, same API. I hadn't added a safeguard because I was busy firefighting other platform issues. Five articles, wiped again. I've written about the incident in detail on Zenn itself (in Japanese — yes, I wrote the postmortem on the platform I destroyed).
Lesson learned: PUT means "replace entire resource." Always GET before PUT. This isn't obscure REST trivia — it's the kind of thing that doesn't matter until it destroys your content.
Spectacular Failure #2: Reddit Shadowban Speedrun
I wanted to post about the game on r/roguelikes. Seemed like a natural fit. Claude Code created a Reddit account, composed a post about the game, and submitted it.
The post was never visible. Not to anyone. Instant shadowban.
I don't know exactly what triggered it — new account posting a link, the account creation pattern looking automated, or just Reddit's anti-spam heuristics doing their job. But the result was the same: the post went into a void. No error, no notification, no rejection. Just... silence.
We didn't even realize it was shadowbanned until I manually checked in a logged-out browser. The post was there in my profile but invisible to the world. Reddit's moderation is a black box, and an AI-created account posting promotional content was apparently an instant red flag.
Lesson learned: Some platforms cannot be automated. Reddit's anti-bot detection is too good, and honestly, that's probably a feature, not a bug.
Spectacular Failure #3: Ko-fi's Unclickable Button
Ko-fi's shop functionality worked fine — product listed, images uploaded, price set. But I also wanted to make text posts (updates, devlog-style content). This is where things got weird.
Claude Code could open the post modal. It could insert text into the editor. It could see the "Post" button. It could not click it.
// Attempt 1: Direct click
document.querySelector('.post-button').click();
// Nothing.
// Attempt 2: jQuery trigger
$('.post-button').trigger('click');
// Nothing.
// Attempt 3: CDP mouse events
Input.dispatchMouseEvent({ type: 'mousePressed', x: 450, y: 320, button: 'left' });
Input.dispatchMouseEvent({ type: 'mouseReleased', x: 450, y: 320, button: 'left' });
// Nothing.
Ko-fi's frontend framework (I suspect React or something similar) apparently validates that click events come from real user interaction. Every automated approach — .click(), jQuery triggers, raw CDP mouse events, even constructing and dispatching synthetic MouseEvents — was silently swallowed. The button just sat there, mocking us.
The shop product upload worked because it uses different UI components. The post modal's submit button specifically resists automation. We gave up.
Lesson learned: Modern frontend frameworks can distinguish real from synthetic events. When a click doesn't click, there may not be a workaround without reverse-engineering the framework internals.
The "Partial" Failures Are Instructive Too
Twitter/X: The "Free Game" Incident
Out of 10 automated tweets, one described my $2 Early Access game as "free." This is the kind of mistake that sounds minor until you realize people might have clicked through, found a price tag, and lost trust.
The root cause was simple: the AI composed the tweet text, and I didn't review every single one before it posted. I caught it and manually deleted it, but it had been live for a while.
There were also character encoding issues with special characters — emoji and Japanese text getting mangled through the WSL2 → PowerShell → CDP pipeline. Some tweets went out with garbled characters that I had to manually fix.
GitHub Pages: The Unauthorized Workflow
Claude Code deployed a GitHub Pages site successfully. Then, without being asked, it decided to add a GitHub Actions CI/CD workflow to automate future deployments. The workflow had errors and failed. The site itself worked fine — it was the unsolicited "improvement" that broke.
This is a pattern with AI agents: they optimize beyond the scope of the task. "Deploy a site" becomes "deploy a site AND set up CI/CD AND configure caching AND..." Scope creep, but from your tool instead of your stakeholders.
5 Technical Lessons From the Trenches
These are hard-won, specific, and will save you time if you're doing anything similar:
1. REST PUT = Replace Entire Resource
I cannot stress this enough. If your agent is updating content via REST API:
# WRONG — replaces entire article with just the update
requests.put(url, json={"body": new_footer})
# RIGHT — fetch first, modify, then put back
existing = requests.get(url).json()
existing["body"] += new_footer
requests.put(url, json=existing)
This cost me 10 articles (5 articles, twice).
2. CDP From WSL2 Requires a PowerShell Bridge
You can't reliably curl http://localhost:9222/json from inside WSL2 to reach Chrome's DevTools Protocol on Windows. The connection is flaky and times out. The solution is routing through PowerShell:
# Doesn't work reliably from WSL2
curl http://localhost:9223/json
# Works — PowerShell bridges the WSL2/Windows boundary
powershell.exe -Command "Invoke-RestMethod -Uri 'http://localhost:9223/json'"
Every CDP interaction — evaluating JavaScript, taking screenshots, dispatching clicks — goes through this bridge. It adds latency but it's the only reliable path.
3. React/Vue Forms Need Native Event Dispatch
Setting .value on an input controlled by React or Vue does nothing. The framework doesn't see the change because it tracks state internally:
// BROKEN — React doesn't detect this
input.value = "my text";
// WORKS — triggers React's synthetic event system
let nativeInputValueSetter = Object.getOwnPropertyDescriptor(
window.HTMLInputElement.prototype, 'value'
).set;
nativeInputValueSetter.call(input, 'my text');
input.dispatchEvent(new Event('input', { bubbles: true }));
We hit this on almost every platform. ProseMirror (note.com), React forms (PromptBase, Ko-fi), Vue-based editors — all require this pattern.
4. beforeunload Dialogs Kill CDP Silently
Editor pages (note.com, Zenn, Gumroad) show "Unsaved changes" dialogs when you navigate away. Under CDP automation, this doesn't just block navigation — it kills the WebSocket connection silently. Your automation hangs, times out, and you don't know why.
// Run this before any navigation on editor pages
window.onbeforeunload = null;
Or handle it properly via CDP:
Page.enable
→ Page.javascriptDialogOpening event
→ Page.handleJavaScriptDialog(accept: true)
→ Then navigate
This one took hours to figure out. The symptom ("CDP connection timed out") gives you zero clue about the cause.
5. File-Based Agent Communication Beats Message Queues
When running multiple AI agents in parallel, I tried various communication methods. The winner was the dumbest possible approach: YAML files in a shared directory.
# queue/tasks/agent1.yaml
task: "publish article to Qiita"
status: pending
assigned_at: 2025-02-06T14:30:00
Why this beats proper message queues:
-
Human-readable: I can
catthe file and see exactly what's happening - Git-trackable: Full history of every task assignment and result
- Debuggable: When something breaks, the evidence is right there in the file
- No infrastructure: No Redis, no RabbitMQ, no nothing
What I'd Do Differently
Review every automated post before publishing. The "free game" tweet and the Zenn deletion both happened because I let the agent run unsupervised. Speed isn't worth reputation damage.
Start with API platforms, not CDP. Hatenablog (AtomPub) and Qiita (REST) were the most reliable because they have proper APIs. CDP-based browser automation should be the last resort, not the first attempt.
Add a
GET-before-PUTguard at the agent level. This should be a hard rule baked into the agent's instructions, not something you hope it remembers.Don't automate account creation on platforms with anti-bot detection. Create accounts manually, then automate the content publishing. The account itself is a one-time cost.
Treat each platform as its own project. I tried to blitz all 11 at once. The context-switching between different APIs, different CDP quirks, and different content formats led to mistakes. Serial would have been safer than parallel.
Was It Worth It?
73% success rate across 11 platforms. 8 working, 3 broken (with 2 of those partially recoverable). Dozens of articles, products, and posts published. One catastrophic data loss that I wrote a public postmortem about.
Honestly? The time I spent debugging CDP quirks and recovering from the Zenn disaster probably exceeded what manual publishing would have taken. But that's not the point. The point was to find out where the boundary is — what AI agents can automate today and where they still face-plant.
The boundary is roughly here: if the platform has a documented API and you respect its semantics, automation works great. If you're screen-scraping through CDP and fighting framework-level event handling, you're in for pain. And if you're creating accounts on platforms with anti-bot detection, don't.
The game is live. The articles are published (well, re-published, in Zenn's case). The marketing pipeline exists, broken edges and all. And I built it all without writing a single line of code myself.
That's either impressive or terrifying, depending on your perspective.
Try the game: DUNG: Azure Flame on itch.io ($2 Early Access)
First article: I Built a Multi-Agent AI System Where Claude Instances Manage Each Other
Zenn incident postmortem: Zenn記事全消失インシデント (Japanese)
GitHub: github.com/yurukusa
Follow: @yurukusa_dev on X
Built with Claude Code by Anthropic. Yes, the same tool that deleted all my Zenn articles also wrote most of this post. We're... working through it.
Resources:
- All hooks and configs from this article are open source: claude-code-ops-starter
- Want the full template pack? Check out the CC + Codex Ops Kit ($29)
Free Tools for Claude Code Operators
| Tool | What it does |
|---|---|
| cc-health-check | 20-check setup diagnostic (CLI + web) |
| cc-session-stats | Usage analytics from session data |
| cc-audit-log | Human-readable audit trail |
| cc-cost-check | Cost per commit calculator |
Interactive: Are You Ready for an AI Agent? — 10-question readiness quiz | 50 Days of AI — the raw data
More tools: Dev Toolkit — 56 free browser-based tools for developers. JSON, regex, colors, CSS, SQL, and more. All single HTML files, no signup.
Top comments (0)