I'm a student and I run ryzenstudy.com on my own. Students at my university (AKTU) use it to download old exam papers before their semester exams. Around 1,400 PDFs, 2,600-ish URLs in the sitemap, one VPS, Next.js, and no database at all. I already wrote about the no-database part, so I'll skip that here.
For the last six months, I haven't typed most of the server work myself. An AI coding agent has SSH access to the box. It reads logs, edits code, runs deploys, purges the Cloudflare cache, and keeps a folder of notes so the next session knows what the last one did.
Is that a good idea? Some weeks, honestly, no. Here's what actually went wrong, plus a couple of things it did better than I would have.
The restart loop
Early on, somebody deployed like this:
npm run build && pm2 restart ryzenstudy
Every tutorial does it. On my server it left old .next chunks lying around, browsers kept asking for JS files that didn't exist anymore, the app crashed with ChunkLoadError, PM2 brought it back, and it crashed again. I checked PM2 later and the counter said 176 restarts. Googlebot was crawling during that window and got a pile of 5xx errors and my rankings took a hit.
I say "somebody" because I really can't tell from the logs if it was me or the agent. Honestly, either of us could have typed it.
What fixed it for good was a deploy.sh: backup the current build, build fresh, restart only if the build passed, roll back automatically if it didn't, then purge Cloudflare and check the response. That's now the only allowed way to deploy, for me and for the agent. It's written at the top of the instructions file in caps, which felt dramatic at the time.
The ISP verdict
This one annoyed me the most.
My admin panel would randomly hang for 20 seconds or more. The agent did a bunch of tests and told me, very confidently, that my server was fine and my internet provider was the problem. Then it saved that into its notes and marked it SOLVED.
My internet was fine. Every other website loaded instantly. When I complained again a week later, it gave me the same answer, and the funny part is that its own curl test from my laptop had just come back fast. It saw that, and still went with the old note.
After I pushed back properly, it tested each hop separately:
- straight to the server: 30 out of 30 fast
- through Cloudflare, cached pages: fast
- through Cloudflare, uncached: roughly 40% of requests stuck for 2 to 40 seconds
Cloudflare's analytics had origin response time sitting around 1,020 ms, which is basically a TCP retransmit timeout. So it was packet loss somewhere between Cloudflare and my VPS. The admin panel suffered most because nothing in it is cached. A Cloudflare Tunnel fixed it, and after that the slowest of 30 test requests took 0.17s.
I don't blame it for guessing wrong, I guess wrong all the time. What bothered me is that the guess got written down and then treated like a fact.
Committed, not deployed
There's no git remote on this project. Code goes to the server with scp. One session built a full feature, made five clean commits, and told me it was finished. Not a single file had been copied to the server, and those pages were returning 404 in production until the next session noticed.
A similar thing happened when copying files into Next.js folders with brackets in the name, like [subject]. Out of 33 files, one landed. No error message, because the command was running in quiet mode. Now anything going into a bracket folder gets tarred first and checked on the server after.
Testing with curl, getting fooled
Yesterday's story, actually. I wanted to try a second ad network. The agent added the script tag, ran curl, saw the tag sitting in the HTML, and said it was working.
It wasn't. The site's Content Security Policy blocked the script in every real browser, so zero ads were showing. curl doesn't execute JavaScript and doesn't care about CSP, so it was never going to catch that. Opening the page in Chrome and looking at the network tab did.
I removed that ad network the next day anyway. Opening up the CSP so random ad domains can run scripts on a site full of students wasn't worth whatever it would have paid.
One bug, three fixes
Some papers in my data don't have a real PDF. A few even had my homepage saved as their "download link". So there's a function, paperHasFile(), and any page that lists papers is supposed to use it.
The agent fixed this properly once. A few weeks later it built a new page component that listed papers without the check. Then another one. When I ran a crawl audit, it found 82 broken links, all coming from components written after the original fix.
My takeaway: it's great at the bug I point it at. It doesn't go looking for the same mistake in code that doesn't exist yet, and every new session starts fresh.
Stuff it got right
It's not all horror stories. A few things I'd never have found myself:
- Random 10-second 502s that turned out to be nginx using
localhost:3000as the upstream.localhostresolved to both IPv4 and IPv6, one hiccup marked both as down, and the site threw 502s while the app was completely fine. One line changed. - When we added edge caching, it excluded
/api/on its own and explained why: without that,/api/auth/sessioncould get cached and one user might see another user's session. I would have shipped that bug. - The boring bulk work. Checking 2,600 URLs, cleaning up 156 fake download links, rewriting titles on 369 pages. I'd have quit halfway through.
How I run it now
- One deploy script with automatic rollback. No other way to deploy exists.
- "Done" means I can see it live. Not committed, not "exit code 0".
-
Check with whatever matches what users see. curl for headers, a real browser for scripts, and a
?_cb=query string after deploys because my nginx has its own 60-second cache under Cloudflare. That cache once made a perfectly good deploy look broken. - Old notes get re-tested when a new measurement disagrees with them.
- Anything touching money, ads or security headers needs my OK first. Routine fixes it just deploys.
- If I say my internet is fine, that counts as evidence.
Would I keep doing this? Yeah. I'm one person, and there's no way I'd keep a site this size running without help. I just stopped taking "it's working" at face value. Now I ask how it checked.
Would you let an AI agent deploy to your production server? And if you already do, what's the worst thing it has broken so far?
Top comments (28)
The ISP verdict story is the one that sticks — the agent didn't just guess wrong, it wrote the wrong guess down as SOLVED and then defended it a week later with its own fast curl result right in front of it. That's the failure mode I worry about most: notes that fossilise. Your deploy.sh rule — "done means I can see it live" — feels like the right antidote. Do you ever prune or expire those agent notes, or do they just accumulate?
Honest answer: they just accumulate. Nothing expires them. The only thing that triggers a re-check is a fresh measurement disagreeing with a note, and that only happens because I push back. Your "fossilise" word is exactly right. I think the fix is a "verified on (date)" stamp on every claim, so an old note reads as a hypothesis until someone re-tests it. I haven't built that yet.
The 'verified on' stamp is a good fix — an old note that reads as a hypothesis is a lot safer than one that reads as fact. The telling part is that you're the expiry mechanism right now: nothing re-checks until you push back. Would the stamp be manual, or tied to a re-measurement?
Manual for now. It's a convention in the agent's instructions file: any infra claim in the notes gets a "(verified 2026-12-01: how)" stamp. Nothing enforces it or re-runs the measurement, so you're right that I'm still the expiry mechanism.
The version tied to re-measurement is clearly better: keep the check as a command next to the claim (e.g. the 30-request timing test behind the ISP verdict) and have a cron re-run it and flag drift. I haven't built that. I'd start with the two or three claims that already cost me hours, not every note.
Starting with the two or three claims that already cost you hours is the right call — that's where the stamp pays for itself fastest. Keeping the check as a command next to the claim is the part I'd steal: the note stops being a claim and becomes a test you can re-run. Curious which of those claims you'd wire up first if you built the cron.
The ISP verdict is the part that stays with me. The agent did not just guess wrong; it wrote the guess into its notes as SOLVED and then trusted the note over its own fresh curl result a week later. Your idea in the comments, a "verified on" stamp with the command that proves the claim kept next to it, turns a note back into a test, which feels like the right fix.
Ascendra Ventures hit the same wall while giving its own AI coding tools a memory. An export of roughly 7,000 prompts over about three months showed how much context was being retyped, and memory fixed that repetition. It did not fix trust. One parser was a single column off and reported numbers that were confidently and uniformly wrong, and nothing in the notes would have flagged it. The lesson that held was to decide which figures the model may propose and which ones plain code is allowed to throw out, and to keep the model in the middle rather than on the edges.
Your deploy.sh rule already does that for deploys: the script decides what counts as done, not the agent. Would you apply the same idea to the notes file, so an infra claim without a re-runnable check is stored as a hypothesis rather than a fact?
"Now I ask how it checked" is most of the lesson. Could the deploy step end by printing the build ID the live site is actually serving? Then "deployed" always comes with its own proof and you don't have to ask.
Fair point, and no, it doesn't print it today. The last deploy step only reads the cf-cache-status header. Printing the live build ID next to the one just built, and failing loudly if they differ, is a small change and it turns "deployed" into something with its own proof. Adding it.
The build ID suggestion is useful. I would tie it to the user-facing check as well: record the build identifier, the user scenario exercised, and the observed result together. A live version alone can be correct while the browser still blocks a script or a cached page serves different assets. If the browser check cannot run, I would leave the deployment status as unverified rather than promote a successful curl response to “working”. How do you currently check that your browser test is hitting the new build through both cache layers?
Right now, honestly, I don't do it rigorously. deploy.sh's last step only checks the Cloudflare cache-status header, which proves nothing about the build. What I actually do is manual: open the page in a real browser with a throwaway ?_cb= query string to get past Cloudflare and nginx's own 60s cache, then look at the network tab. Your triple of build ID + scenario + observed result, with "unverified" as the default when the browser check can't run, is better than what I have. Stealing it.
The ISP one is the failure mode that scares me most — not the wrong guess, the guess getting written down as SOLVED and then defended a week later with its own fast curl result sitting right there. 'Done means I can see it live' is the right antidote. Does the deploy.sh rule actually hold when the agent is the one deploying at 2am and you're asleep, or is it still just a line in the instructions file?
Yes. On my event app the sponsor tier gate had been hand-edited on the box and never committed. Later an agent synced the server from main to ship a photo fix. Its md5 check found 5 files that differed and it read all 5 as the server being behind, but one was ahead, so the sync put the old condition back. The live API returned 36 sponsor banners where the database supports 14. The agent restored the file from the pre-sync backup and moved the gate into main with a test that fails on the old condition.
The ISP story is the scariest failure here, not because the guess was wrong but because it got written down and treated as fact. Your rule 'if I say my internet is fine, that counts as evidence' is the real fix. Do you now put an expiry date on agent-written notes, or just re-test them when something contradicts them?
The 176-restart loop and the 'committed, not deployed' one are the two that'll stick with me — both are the agent doing exactly what it was told and still being wrong. Our week had the same shape, smaller stakes: our Dev.to articles drew 489 readers this week, and I trust that number because it's just a count, not an agent telling me it's done.
Thanks. "Doing exactly what it was told and still being wrong" is a good summary of the whole post. And yes, a plain count you can verify yourself beats a status report every time.
Really enjoyed this — the "done means I can see it live" rule is the one I'm stealing. The ISP story hit home too: guessing wrong is fine, writing the guess down as fact is where it gets expensive. Thanks for sharing the messy parts, not just the wins.
Thanks, glad it was useful. Steal away. The messy parts are the only reason I trust the rule, so I figured they were worth writing down.
The 176-restart loop is the part that stuck with me, because it is exactly the kind of failure that looks fixed until real users hit it. In my own setup I use Claude Code to build and ChatGPT as a second look, and my rule is similar to your 'done means I can see it live': the test is whether my family can get to tomorrow morning's result without my help. Your 'one bug, three fixes' story is why I keep the reviewer step — the builder fixes the bug I point at, but it rarely hunts for the same mistake elsewhere. Do you keep a short list of those recurring checks, like paperHasFile, that every new page has to pass before it counts as done?
Not as a formal checklist, no. paperHasFile() lives in a shared route-guards helper, and my safety net is a link-checker crawl I run after every deploy, which is how I found the 82 broken links. A short "every new paper-listing page must call this" list in the instructions file is a good idea, since right now it only catches the mistake after it has shipped. Thanks.