Dev.to WebDev πŸ›  Dev πŸ‘ 0 πŸ“– 8 min read

I Run a Side Business With AI Agents. Here's What Broke in 14 Days

I let AI agents write the code for my side business, and within two weeks one left a 7.6 GB orphan process on my machine, another silently skipped the tests I asked for, and a third nearly shipped a form that would have

I Run a Side Business With AI Agents. Here's What Broke in 14 Days

I let AI agents write the code for my side business, and within two weeks one left a 7.6 GB orphan process on my machine, another silently skipped the tests I asked for, and a third nearly shipped a form that would have dropped every real sign-up.

The reality of running a side business with AI coding agents is not sipping coffee while passive income rolls in. It is debugging weird failure modes that never show up in Twitter demos.

Here is what running eight data websites with AI coding agents actually looks like, what broke in the first fourteen days, and the rules I had to enforce so each mistake only happens once.

TL;DR:

  • I run Devetty, a portfolio of small data sites built on Spanish public data.
  • An orchestrator agent (a Claude Code session I open, not an autonomous bot) acts as CEO: it diagnoses issues and scopes tasks, but never writes code directly. Cheaper worker agents (Codex, Gemini Flash, opencode) write the code.
  • In two weeks we shipped 8 live sites, ~25,000 URLs in sitemaps, and 82 commits backed by 1,518 tests.
  • Total traffic over 28 days: ~1,400 visits, ~69 from search engines, and $0.00 in revenue.
  • Every incident is logged into a mandatory checklist read before any new agent launches.

Architecture diagram showing the orchestrator agent, coding workers, incident log, and verification pipeline
The setup: the orchestrator coordinates and verifies, specialized models execute atomic tasks, and every bug feeds back into the incident log.

The Setup: One Boss, Many Sandboxed Workers

How do you keep an autonomous agent from turning your codebase into spaghetti?

You treat it like an intern who has read every programming book on Earth but has zero common sense.

My architecture relies on three agnostic products I built in Laravel and Python:

  1. A web engine and CMS that serves every website from a declarative JSON manifest.
  2. A scheduled scraping engine that pulls and normalizes public data feeds.
  3. A company-management app with a REST API to track bets, tasks, and state.

On top of this sits an orchestrator agent acting as CEO. It is not autonomous: it is a Claude Code session I open when I sit down to work (before and after my day job). In each session it inspects metrics, reviews the SEO issues that scheduled routines file automatically every four hours, and drafts task prompts.

Crucially, the orchestrator never writes code.

When I approve a task, the orchestrator spawns a fresh coding worker (Codex, Gemini Flash, or an open model via opencode). Only one agent works on a repository at any given time. It works in an isolated sandbox, runs tests, reports its diff, and terminates.

Have you ever trusted an AI summary of its own work? If so, you already know why this setup broke immediately.

The 14-Day Tally: Fast Code vs. Slow Reality

Before getting into crashes and memory leaks, look at what the agents produced in two weeks:

  • 8 live websites running on Spanish open data (public tenders, BOE court/tax auctions, public grants, civil-service exams, fuel prices, cancel guides, and a UGC rates calculator; the sites are in Spanish).
  • ~25,000 URLs generated across programmatic directories and sitemaps.
  • 82 commits across the workspace repository.
  • 1,518 automated tests passing in the core web engine.

Velocity is real. A typical agent pass takes five to ten minutes.

Dashboard comparing shipped output against honest traffic, revenue, and incidents
The raw numbers: 25,000 URLs and 1,518 tests shipped, met by 69 search visits and zero dollars.

Now look at the other side of the ledger over the last 28 days:

  • Total visits across all eight sites: ~1,400.
  • Visits from organic search engines: ~69.
  • Best performing single site: 39 Google clicks on 500 impressions.
  • Total revenue: $0.00.
  • My first 15 dev.to posts: 201 total views (and 8 were in Spanish on an English platform, which taught me that language mismatch equals zero engagement).

Generating code with AI is essentially free and fast. Search indexation, audience trust, and distribution remain as slow as ever.

If your plan is to generate twenty thousand pages and expect Google to hand you a living tomorrow morning, prepare for a very quiet analytics dashboard.

So what actually went wrong? Here are the real incidents.

Prompting Traps: 22-Minute Freezes and Identity Crises

One of my first background agents was still "running" after twenty minutes.

The process was hung on: Reading additional input from stdin.

In background mode, the CLI tool kept waiting for interactive keyboard input that was never going to come. It sat there burning clock cycles for 22 minutes until I killed it.

The fix was closing standard input:

# Before: background process waits for terminal input
codex exec -C repos/engine -s workspace-write "Fix route handler"

# After: close stdin immediately
codex exec -C repos/engine -s workspace-write "Fix route handler" < /dev/null

A few days later, another agent produced zero code. Instead, it tried to call the company-management API to file tasks.

What happened? The agent had read the repository's AGENTS.md, saw the rule intended for the CEO orchestrator, and assumed it was the CEO. It spent its turn delegating to nobody.

Now, every worker prompt begins with a mandatory role header:

ROLE: you are the EXECUTING worker agent. The AGENTS.md orchestration rule
applies to the orchestrator, not to you. Do not delegate; write the code.

Who knew prompt engineering would look like corporate org charts?

The Illusion of Progress: Ghost Tests and Stale Configs

Have you ever had an agent claim it wrote comprehensive test coverage when it wrote nothing?

On a large multi-module task, the prompt asked for code and tests. The agent delivered a tidy summary and the code.

I checked the diff: no new tests. The suite was green simply because nothing new was being tested.

When I re-prompted it, the agent did the exact same thing a second time.

The fix: split large tasks into small phases and require the summary to explicitly list the name of every test function added. If a test name is not in the summary, it does not exist.

Then came the stale config disaster.

I asked a cheap model to make a small change in four JSON site configs. It started from stale copies of the files.

Its summary listed only the requested change. The key-by-key diff showed it had also quietly reverted custom SEO titles, the cross-site menu, redirect rules and a homepage. I caught it before applying anything.

Now, the orchestrator snapshots all configs before launching an agent and diffs them key-by-key. Never trust an agent's summary of what it touched.

The Green Tests That Lied: Cached Forms and Carbon Gotchas

This was our nastiest bug because every automated test was passing.

We added an anti-bot verification token to all newsletter and inquiry forms. To prevent replay attacks, the token was set to expire after two hours.

The unit tests verified that valid tokens passed and expired tokens were rejected. All 1,518 tests passed.

What could go wrong?

The web engine aggressively caches public HTML pages for performance.

But visitors get cached pages, with a form whose token was rendered hours earlier. Every one of those submissions would have failed validation, and real sign-ups would have been dropped silently, with the whole suite green. I caught it in review, before it shipped.

The rule: whenever an agent touches form validation, verify where the token is generated and whether that HTML response is cached.

Then came a PHP Carbon 3 trap that sailed through the tests:

// What the agent wrote:
if (now()->diffInMinutes($item->created_at) < 10) {
    // Process urgent item
}

Can you spot the bug?

In Carbon 3, now()->diffInMinutes($pastDate) returns a negative integer when comparing the present to the past.

Because any negative number is less than 10, the check evaluated to true for items created five minutes ago or three years ago.

The fix is using explicit boolean time comparisons:

// The fix: explicit time boundary
if ($item->created_at->gt(now()->subMinutes(10))) {
    // Process urgent item
}

The model understood recency, but failed to anticipate library-specific API semantics.

Starving the Server: 7.6 GB RAM Leaks and Broken Views

One afternoon my machine ran out of memory and started killing background jobs.

I had stopped a stuck agent by killing its process. The test runner it had spawned did not die with it: it kept running as an orphan for five more minutes and reached 7.6 GB of RAM.

Worse, it was sharing the test database with another agent's run.

Now, whenever an agent is terminated, we kill child processes down the entire process tree:

# Ensure child processes are killed alongside the parent runner
pkill -P $AGENT_PID

A few days later, a config change to our scheduled scraper produced a data view of about 33,000 rows, over the view's row limit.

Every hourly scraping run failed for five hours straight. Nobody noticed, because the health check had been done on the run before the change.

The new rule: after applying a scraping config, trigger a run immediately and inspect that specific run.

The Verification Playbook: What Actually Works

After two weeks of debugging things that should have worked, our operating manual boiled down to three core principles:

  1. Agent reports are claims, not proof. An agent will look you in the digital eye and say it added tests and verified edge cases when it did none of those things. Verify everything with git diff, re-run test suites independently in a clean shell, and visit the rendered HTML.
  2. Cheap models for scoped edits, strong models for multi-file work. Don't waste expensive reasoning models on adding a field to a config file. Never ask a fast, cheap model to refactor logic spanning five files unless you enjoy hunting regressions.
  3. Budget and quotas come first. Before launching any agent, check token usage and quotas. An agent that cuts off mid-file leaves your workspace in an inconsistent, broken state.

Building small digital assets with AI agents is a practical way to multiply what a solo developer can build.

At Devetty, I can maintain eight distinct sites, run automated scrapers, and ship features without drowning in boilerplate.

Just don't fool yourself into thinking the agents are in charge. In my setup they aren't: nothing ships without my yes. The moment you stop checking the diffs is the moment an agent gives itself a promotion, leaves 7.6 GB of RAM behind, and tells you the tests are green.

What is the weirdest or most silent way an AI coding agent broke your codebase or pipeline?

I write these with help from AI agents and check every number myself.

πŸ“° Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.