I emotionally broke my AI agent (and I feel terrible about it)

 

Actual footage

Say hi, James... 

Hey y'all, 

It's "been a minute", as the kids say. So, what have I been up to? 

Well, I've been continuing my experiments with vibe coding. More specifically, I've been experimenting with Gemini within Android Studio - and its ability to generate apps based on wireframes I provide it. 

And, actually, that experiment has been going quite well: 

Not looking too shabby!

I was doing this kinda piecemeal ("make a screen that looks like this... now, when they click that button, show them another screen that looks like this..."), but it was working pretty well. 

So, what went wrong? 

I became too demanding: 

Yes, that's right... I asked it to change font! 

And that's when things started failing:

And even Gemini struggled to make their solution build: 

But at least it was very apologetic about its errors: 


And it solved the issue eventually: 


Oh no, my mistake... it didn't solve the issue at all:


And it got itself in a right state, looping over and over the same issues. 

..and over, and over...


It got to the point where I had to stop it and tell it to pull itself together. Unfortunately, this just caused the poor thing to start being quite hard on itself: 

This would become a pattern. A sincere apology. A resolve to sort the problem. And a clear plan going forward. 

The good news was that it was narrowing down the error. It was REALLY SURE that the Type.kt needed fixing..and fixing..and fixing... 



...but it just kept on flip-flopping its changes back and forth. So I had to step in again: 


This just caused it to double down on its feelings of regret:


And double down on its resolve to fix the issue:

And double down on it's "clear plan" for resolution:


But, alas, none of these words got us any closer to actually solving the issue: 
...and after about 30 minutes of watching Gemini apologise, try to change things, fail, apologise, make a plan, try to change things... I gave up and googled it myself. Shout out to Vincent Tsen for their blog on the subject


...where following three simple steps actually fixed the problem: 

So what did we learn? 

I found this whole thing quite funny. The hyperbolic language - "this ends now!". The empty promises. The relatively trivial solution. 

But I reckon there are serious lessons to take away from this ordeal. 

As a vibe coder...

... this whole thing was frustrating. It took me as long to solve this tiny issue as it had done to build the rest of the app. It kept going round and round, not getting any further. I had to keep stopping it and asking it to try again. It ended up arguing with itself. It was so much quicker to just do it myself, which kinda defeats the purpose of vibe coding. 

Had I been on a paid plan, this would have cost me a fortune, too. 

As a manager...

...I found myself thinking about times when I've had comms like this from my team. Or thinking back to when I might have said similar things as a coder. 

For whatever reason, I've struggled with my ticket... how do I save face with the boss? I'll start by apologising sincerely... then assure them that I understand the seriousness and will finally get this thing sorted...and reassure them by telling them what I'm going to do. 

Something about watching Gemini play back this, very human, behaviour to me...it just makes the whole thing feel artificial and pointless. It's posturing and "upward management"...and I just find the whole thing quite distasteful. 

I remember one occasion such as this, when a semi-major piece of work got away from me...looking back, I was out of my depth from the start. I didn't understand it. I shouldn't have taken it on. Or I should have asked for help from the get go. 

My manager / scrum master / whatever at the time will have seen the same pattern from me that I saw from Gemini. With each standup a more sincere apology. With each standup more assurance that it's going to be sorted. More reassurance that I have a plan. And it was all, of course, baloney. I ended up burning out and being signed off with stress.

All because I got into the same loop Gemini gets into. 

So... what should Gemini have done instead? What should I have done instead? 

Instead of pretending to humble myself by apologising, I should actually have humbled myself and asked for help early doors. A proper human conversation with another engineer might have helped. 

I should have recognised that I was in this loop and understood that getting out of the loop was more important than completing the work. A proper human conversation with my boss might have helped.

And I should probably have shared this experience with my team afterwards, to encourage them to have these proper human conversations sooner. 

For Gemini, and vibe agents in general.. I guess it's a call to action to understand that humans aren't perfect...and that when you mimic their behaviour, you end up mimicking both the good and the bad... so maybe there needs to be an additional layer of introspection from the AI "how many times have I made these promises? Should I just stop and say I need help?" 

Farewell

So, there we go, we had a bit of a tinker. We learnt a bit about coding, a bit about AI and maybe even a bit about ourselves. Lovely jubbly. 

As always thanks to the elite that make it all the way down here. Happy New Year, stay awesome.