DEV Community

A 2-Week AI Coding Experiment Turned Into 9 Months - 3 Real Failures That Changed My Design

When I started building CycleCode - a local-first desktop workspace for structured AI-assisted development - I thought it would take two weeks.

Nine months later, working evenings and weekends on two modest AI subscriptions, the first real end-to-end runs taught me a blunt lesson: clean diagrams on paper fall apart fast once real LLM responses, package managers, and Git collide.

Worse, my early attempts to keep agents "safe" buried both the codebase and the UI under IDs, hashes, and noisy system threads. In 0.1.0-preview.7, I ripped out a lot of that complexity and rebuilt the workflow around failures that actually happened in live runs. Here are three of them.

1. The agent updated package.json, followed the rules, and broke npm ci

During one run, a Developer agent added React to package.json. It strictly respected the task's allowed_files boundary, so it didn't touch package-lock.json.

Right after the turn finished, dependency preparation ran npm ci. It failed immediately with EUSAGE because the lockfile didn't match package.json, and the UI surfaced an unhelpful generic FAILED status.

The fix: Run Profiles now declare coupled files (couplings). When a task includes package.json, its companion lockfile is automatically allowed in scope, the session reminds the agent up to twice to keep them in sync, and failures surface explicit codes like DEPENDENCY_PREPARATION_FAILED instead of a generic red badge.

2. git checkout flagged as a scope violation

During repair attempts, restoring an earlier candidate snapshot with git checkout updated .git/index. My scope checker compared index state, saw changes outside source paths, and rejected the run with GIT_METADATA_VIOLATION - even though every actual project file touched was inside allowed_files.

The fix: Staging metadata in .git/index is no longer treated as a scope breach. Real branch or HEAD moves are separated into GIT_STATE_CHANGED, and repair instructions now use:

git restore --source=<commit> --worktree -- .

3. Every unit test passed - and the app had zero working UI

This one hurt the most. On a live UI project run, every test went green and a candidate even passed review. Then I looked at what was actually configured to run: the only RUN profile started a Fastify API returning JSON, while the React components were non-functional stubs.

Green unit tests tell you nothing if the app never renders in a browser.

The fix: UI projects in 0.1.0-preview.7 now require a browser-facing RUN profile before architecture or profile approval. Before a candidate can be accepted, a mandatory app-start check boots the app on a local port, waits for an HTTP 200 text/html response, and tears down the entire process tree cleanly.

Why Auto is still disabled

Instead of chasing a flashy one-click "build everything" button, I replaced the hardcoded stage-transition spaghetti with a single JSON Workflow Engine and added Semi-auto per Work Item.

Semi-auto keeps clarification, analysis, design, and task prep moving forward so you aren't clicking through dozens of tiny handoffs. At the same time, it always stops at human approval gates before any code gets written, and full Auto stays off until the underlying checks earn trust on real runs.

I also spent serious time cleaning up the interface itself: merging scattered document screens into one shared viewer, tucking technical IDs and system threads out of sight by default, and adding a Pick element tool in the prototype preview so small UI tweaks don't rewrite whole files. Human attention burns out just as fast as context windows.

Try it or read the full engineering breakdown

  • Full write-up & architecture diagram: Inside CycleCode 0.1.0-preview.7 on VedaCarrier
  • Download (0.1.0-preview.7): CycleCode Releases on GitHub
  • Related guide: Why AI Coding Agents Need Modular Architecture, Scope Rules, and Start Checks

If you're building with coding agents on real repos, I'd love to hear what unexpected edge case broke your workflow first.

Read on DEV Community ↗ ← Back to News

Comments

No comments yet. Start the discussion.