My wife’s reaction to this week:

“Is the photo upload ready for tomorrow’s show?”
“Well, I’ve been working with AI agents and just made an app that demonstrates over 70 different UI patterns and styles!”
“That’s not what I asked.”
“…no.”
“Cool. Also, what’s going on in the basement?”

Welcome to Week 4, where I learned that AI agents are like junior developers who never sleep and are paid by lines-of-code, GitHub Codespaces is pretty great (spent like $1 running my copilot minion for 10 hours in one three), async bugs hide in plain sight for weeks, and basements don’t care about your sprint deadlines.

What My Wife Expected:
└── 📸 "Process 150 photos" button (saves 45 min/show)

What Actually Happened:
├── 🤖 Started using AI agents (mistakes were made)
├── 🤖 GitHub Codespaces (Codespaced?) all of the things
├── 🐛 Fixed async ordering bug (photos now in order!)
├── ❌ Missed the photo deadline
├── 🏗️ Made a Terraform module for WIF
├── 🔄 Started using AI agents as researcher or template apply'ers rather than engineers
└── 🌊 Basement flooded (not my fault)

The AI Agent Honeymoon Phase

Remember last week when I said we’d have the magical photo processing button? Well, I discovered AI coding agents this week. You know that feeling when you find a new productivity tool and think it’ll solve all your problems?

Yeah, that.

“Just let the AI handle the boilerplate, and maybe the plan” I thought. “It’ll speed everything up,” I thought. “I’ve been coding in Swift for 4 weeks, it has to be better than me,” I thought.

Narrator: It definitely sped up code generation. And bug generation, logic bloat, feature creep, and Swift patterns he didn’t need to learn.

The Async Bug That Was Always There

While wrestling with AI-generated code, I stumbled on something beautiful: a fix for our photo ordering bug that’s been haunting us since Week 1.

The problem: Photos uploaded in parallel were arriving out of order. When you’re showing vintage items, having photo 3 appear before photo 1 is… suboptimal.

The culprit: Classic async execution without proper sequencing. Here’s the actual Swift code that was causing the issue:

// Before: The chaos (parallel updates = random order)
try await Task.detached(priority: .userInitiated) {
    let database = Firestore.firestore()
    let coll = database.collection(collectionPath)
    let counterRef = database.document(counterPath)
    
    let batch = database.batch()
    var maxOrder = 0
    
    for link in reorderedLinks {
        guard let id = link.id, let order = link.order else { continue }
        let docRef = coll.document(id)
        batch.updateData(["order": order], forDocument: docRef)
        maxOrder = max(maxOrder, order)
    }
}
// After: The fix (no Task.detached needed - batch.commit() is already async!)
// Removed unnecessary Task.detached wrapper
// batch.commit() handles its own async execution properly
let database = Firestore.firestore() // Use self.db
let coll = database.collection(collectionPath)
let counterRef = database.document(counterPath)

let batch = database.batch()
var maxOrder = 0

for link in reorderedLinks {
    guard let id = link.id, let order = link.order else { continue }
    let docRef = coll.document(id)
    batch.updateData(["order": order], forDocument: docRef)
    maxOrder = max(maxOrder, order)
}

The fix wasn’t even about the ordering logic - it was about understanding that batch.commit() is already async. Adding Task.detached was like putting a hat on a hat. Sometimes the best solutions are removing code, not adding it.

The Infrastructure That Actually Shipped

Between agent debugging sessions and basement water removal, some real work happened:

The Terraform Module Nobody Asked For, But I Use So Many Times

Created a reusable module for GitHub × GCP Workload Identity Federation:

  • No more service account keys in GitHub Actions
  • Properly scoped permissions
  • One module to rule them all

GitHub Codespaces: The Hidden Win

Oh, and I set up the entire monorepo to work with GitHub Codespaces. This might be the most useful thing I built all week:

  • Full dev environment in your browser in seconds
  • No more “works on my machine” (crucial when your machine is underwater)
  • Actually cheap (~$1 for 10 hours of my AI pair programming marathon)
  • Wife can now fix my bugs when I’m shop-vac’ing

The irony? I built this amazing cloud development environment while my actual development environment was taking on water.

Release-Please Doing Its Thing

Our automated releases are now humming along. Version 1.0.0 across the board:

  • iOS app (via TestFlight)
  • Browser extensions (all 4 of them)
  • Cloud Functions (both Go and TypeScript)
  • Firebase rules and schemas

That changelog above? All automated. While I was shop-vac’ing the basement.

How I Changed Using AI Agents

Here’s what I learned about AI agents this week:

The Good:

  • Great at boilerplate generation
  • Excellent rubber duck for debugging
  • Finds patterns you might miss

The Reality:

  • Generates code that looks right but isn’t
  • Confidently wrong about async patterns
  • Creates more code review work than it saves
  • Doesn’t understand your specific business context

The Verdict: AI agents are tools, not teammates. Use them for exploration, not execution. Right now, a human needs to be an expert on everything they build.

The Deadline Miss

I promised my wife the photo processing button. She scheduled her shows around it. I delivered… infrastructure and bug fixes.

Her: “Can I use it tomorrow?”
Me: “The async ordering is fixed!”
Her: “That’s nice. Can I use it tomorrow?”
Me: “…The Terraform module is really clean though.”
Her: silently starts manually processing 150 photos

Marriage difficulty: Legendary.

Next Week (For Real This Time)

Now that I’m done playing with AI toys and fixing floods:

  • Photo batch processing button (no really, for real this time)
  • Show analytics dashboard (she’s tracking everything in spreadsheets)
  • Maybe some actual features she can see
Trust Level After Week 4:
Week 1: ████████████ 100% ("He's building me an app!")
Week 2: ██████████░░ 85% ("These features save time!")
Week 3: ████████░░░░ 70% ("Infrastructure is... good?")
Week 4: ████░░░░░░░░ 35% ("So about that deadline...")
Goal:   █████████████ 110% (Photo button = redemption)

Basement Water Level:
Monday:   ░░░░░░░░░░ Dry
Thursday: ░░░░░░░░░░ Why?
Friday:   ██████████ Shop-vac time... over 60 gallons
Saturday: ██░░░░░░░░ Getting there
Sunday:   ░░░░░░░░░░ Finally

Lessons Learned

  1. AI agents are like eager interns - helpful for certain tasks, but need constant supervision.
  2. Async bugs compound - that “minor” ordering issue affects everything downstream through background restarts and app startup state hydration
  3. Infrastructure can wait, features can’t - when your spouse is the PM, priorities are clear
  4. Deleting code is still the best part of the job - nuking premature optimizations is cathartic
  5. Basements flood at the worst times - Murphy’s Law is undefeated

P.S

If you’re thinking about using AI agents for production code, remember: they’re great at making you feel productive while you fix their outputs. Current stats:

  • Code rewrite rate: ~40% per checkpoint
  • Context switching: Every few minutes
  • Useful for: Documentation, boilerplate, rubber ducking
  • Not useful for: Understanding MainActor vs Actor vs Task in Swift

Rules files work great for maintaining reference docs and generating method stubs. But for production code? You’re still the senior engineer.

Also, check your basement before making promises about deadlines.


Building tools for resellers, one crisis at a time. Now with 30% less water damage.