HLN --:--

Strategy

The Accidental Gamification of Vibe Coding

The Accidental Gamification of Vibe Coding

Why "one more prompt" feels like a slot machine for builders.

It is eleven at night. I was going to fix one thing, the color of a button. I write the prompt, hit enter, and text starts streaming across the screen. That stream is a feeling all by itself. I have not seen the result yet, but my brain has already started collecting the reward, because I can see that something is happening. I can see movement. In the old editor the cursor just blinked and nothing happened. Now the screen is talking back to me. And before I have done anything, just by waiting, I slide into a kind of tension and anticipation. What is about to appear?

The output lands. The button is fixed, but along the way Claude noticed something else, "by the way, I cleaned up your state management too." I did not ask for that. But it is good. And right here the first hook fires: I asked for one thing and it gave me more than I asked for. The surprise feels like a small gift. And once you get a gift, you want one more. "Since you understood that so well, can you also do this?" I type. Eleven becomes eleven thirty.

What is happening here is a simple mechanic, but it is hard to describe. In old-school coding there were hours between an idea and a result. You write, you compile, you get an error, you fix it, you try again. The reward was far away and rare. Claude Code collapses that distance into seconds. Idea, prompt, result, all in one breath. And the more often the reward arrives, the faster the brain bonds to it. A slot machine works the same way: you pull the lever, a few seconds, a result. In Claude Code the lever is the prompt, a few seconds, a result. The only difference is that on a slot machine you mostly lose, and here you mostly produce something. But that word "mostly" is the danger itself.

Because the moment that hooks you is not the one where everything works perfectly. It is the one where it almost works. The button is fixed but something broke somewhere else. The page loads but the data does not come through. I got so close, it almost worked, one more prompt and it will resolve. And this is where I cannot get up. Because there is an open loop, an unfinished job, and the human brain cannot tolerate open loops. They call it the Zeigarnik effect, an unfinished task takes up space in your head and will not leave you alone. Walking away from working code is easy. Walking away from broken-but-almost-working code is torture. "I cannot go to bed until I solve this," I say. It is now one in the morning.

And there is this too: now it is my code. Maybe Claude wrote it, but I steered it, I prompted it, I shaped it. With every prompt I invested a little more of myself in this project. Half an hour ago it was a throwaway experiment, now it is "my project." And the more effort, attention, and time you put into something, the harder it becomes to give it up. I know it is not rational. Half of this prototype is junk, I will probably delete it when I look in the morning. But right now, at one thirty in the morning, this is my creation and I cannot abandon it. Ownership crushes logic.

I pick up my phone. On Twitter someone has posted "I shipped an entire SaaS solo this weekend with Claude Code." Underneath, dozens of people saying "same," "incredible," "I wrote 70k lines." And I go back to the screen. I am not actually competing with anyone, but I absorb the pace. If everyone is moving this fast, then stopping means falling behind. The social pressure is invisible but real. Even the people at the very top of the industry admit this feeling. The CEO of Y Combinator tweeted "So addicted to Claude Code, I stayed up 19 hours yesterday," and nearly a million people saw it. Strangely, that comforts me, it means I am not alone.

Then a warning: your token limit is running low. The window will reset in a few hours. And here a completely different feeling enters. Now I am not just saying "let me finish this," I am saying "let me not waste this window." Because the tokens I do not use will evaporate into thin air. This is not scarcity, it is something more insidious than scarcity, "use it or lose it." Like airline miles with an expiration date, if you do not use them they burn. And I paid for my subscription, those tokens are mine by right, if I do not spend them I feel like I am throwing my own money in the trash. The reason Garry Tan sleeps four hours is probably this, not for the output but to optimize the window. The product is now designing my sleep schedule.

The bitter part is that when I wake up in the morning I will see that half the code I produced overnight does not work. There were green checks, the tests passed, everything on screen looked successful. But Claude used a library that reached end of life, or built a structure that will be impossible to refactor in three months. Everything I thought I won that night was actually deferred debt. In gambling they call it a loss disguised as a win, the machine flashes its lights and congratulates you, but you have actually lost. In Stack Overflow's survey two thirds of developers say they lose time to "almost right" code, and half say debugging AI code takes longer than writing it themselves. So this is not just happening to me, this is the mechanic itself.

And here is what I understood: Claude Code did not do this on purpose. Nobody sat down and designed "how do we make developers addicted." They just chased the right things, fast feedback, visible progress, broad capability. But when those right things came together, all the parts of a game accidentally appeared. Fast reward, variable outcome, ownership, social pressure, scarcity, open loops. If a game designer had assembled these on purpose we would call it great gamification. Claude Code arrived at them by accident, and the result is stronger than anything I deliberately tried to build in the last year.

It is two in the morning. I look at the screen, my fingers hovering over the keyboard to write one more prompt. And for the first time, I see what I am doing. This feeling is not a flaw, it is a design. I sell gamification infrastructure, which means I teach people exactly how to put this feeling into their products. But Claude Code taught me a lesson in my own field. And I realized this: the point is not creating this feeling, it is which half of it you create. The creativity and progress side, or the fear of loss and sunk cost side. Claude Code does both, the early hours are the top half, after midnight the bottom half. I close the laptop. I will delete that code tomorrow, but I will write this piece, because a tool I could not put down for one afternoon is no longer just a tool.

If you read this, you clearly see that Claude Code has implemented almost every point of the Octalysis framework created by Yu-kai Chou, a gamification and behavioral design framework that analyzes and drives human motivation, and that is why you told your wife five more minutes. That was four hours ago.

Now let me take that night apart

That feeling has a name. Eight of them, actually.

I build gamification infrastructure for a living. Then, I realized Cursor (accidentally!) shipped a better gamification system than anything I have built in the last year. Then I realized why I had not stopped for 11 hours.

Here is the detail that made me sit up. In July 2025, METR ran a careful randomized trial on experienced developers and found that AI coding tools made them 19% slower while they believed they were 20% faster. A 39 point gap between feeling and reality. In February 2026 they tried to run it again with newer tools and could not. The reason is the most honest sentence anyone has written about this whole phenomenon: developers refused to participate, because they would not work without AI even for a handful of tasks in a paid research setting, even at $150 an hour.

A productivity tool that people will not put down for one afternoon, even when paid to, even when the data says it slows them down, is not behaving like a productivity tool. It is behaving like a slot machine.

At first I assumed this was just normal developer flow. You get an idea, you build, you debug, you ship. Nothing new. But vibe coding feels different because the loop is compressed. Describe intent. Watch code appear. Run it. See what breaks. Prompt again.

The weird part is that the most addictive moment is not when the AI works perfectly.

It is when it almost works.

That "almost" creates the loop. One more prompt. One more fix. One more regeneration. One more deploy. One more "actually, change this tiny thing".

I started mapping this against Yu-kai Chou's Octalysis framework, the standard model for gamification motivation.

Quick context if you have not seen it before. Yu-kai Chou published Octalysis in 2015 after a decade studying what makes games and consumer products feel compulsive. He arranged eight core human motivations as an octagon. The top four (Epic Meaning, Accomplishment, Empowerment, Ownership) are white-hat drives that produce sustained, fulfilling engagement. The bottom four (Social Influence, Scarcity, Unpredictability, Loss Avoidance) are black-hat drives that produce urgency and compulsion. The framework also splits drives between left-brain extrinsic motivation (driven by external reward) and right-brain intrinsic motivation (driven by the activity itself). It is the standard lens product designers use to analyze why a system feels engaging or addictive. Tencent, LEGO and eBay have used it explicitly in their product work.

Yu-kai Chou's Octalysis framework — eight core drives arranged as an octagon, white-hat drives on top, black-hat on the bottom.
Yu-kai Chou's Octalysis framework: eight core drives, white-hat on top, black-hat on the bottom.

It explains the feeling more cleanly than I expected. Vibe coding accidentally hits seven out of eight core drives. Most products that ship gamification on purpose hit two or three.

Development & Accomplishment

Every successful run is a micro level-up. A passing test. A working button. A green deploy. An "implementation complete" message. Traditional coding has these too, but AI compresses the distance between desire and reward. You used to wait hours to see progress. Now you wait seconds.

This is the same drive that makes Duolingo's lesson completion screen work. Vibe coding tools just run that loop faster.

Empowerment of Creativity & Feedback

This is the magical part. You describe a thing and watch it become real. The feedback loop is immediate. It feels less like programming and more like sculpting reality with language. The cost of "what if" experiments drops to near zero, which means you run more of them, which means you discover things you would not have explored before.

This is why the first hour of vibe coding feels qualitatively different from the first hour of normal coding. You are not coding. You are exploring.

Ownership & Possession

Even when the codebase gets messy, it is your messy codebase. Your app. Your agent workflow. Your weird half-working product. The more prompts you invest, the harder it gets to stop. Not because it is rational, but because you have invested attention, prompts, credits, commits, and a piece of your identity.

This is sunk cost wearing the clothes of pride.

Social Influence & Relatedness

The internet amplifies the loop. "Built this in a weekend." "Solo founder with agents." "30 days, 70k lines." "Shipped an MVP in 48 hours." Even if you are not competing directly, you absorb the pace. Stopping starts to feel like falling behind.

This drive is strong enough that the people at the top of the industry openly admit they are inside it. Garry Tan, CEO of Y Combinator, publicly said he became so dependent on Claude Code that he stayed awake for 19 hours and now sleeps four hours a night. Andrej Karpathy, who coined the term vibe coding in February 2025, said he has "never felt so behind as a programmer". When the people defining the field say they cannot keep up with the field, the social pressure on everyone else is structural, not optional.

Scarcity & Impatience

Rate limits. Credits. Context windows. Fast models. New model drops. Scarcity makes the session feel more valuable. You do not just want to code. You want to use the good model while you still have access.

But there is a sub-mechanic inside this drive that deserves its own attention, because once you see it you cannot unsee it. Most subscription AI tools, Claude included, do not just rate-limit you. They allocate a window of tokens that resets at a fixed time, and unused tokens evaporate when the window closes. This is no longer scarcity. It is "use it or lose it", which is one of the most aggressive loss-framing mechanics in behavioral science. Airline miles do it. Cigarette company promotions did it for decades. Cellphone "minutes that expire monthly" did it. It works because it stacks three black-hat drives at once. You feel the scarcity because the token pool is finite. You feel the loss because unused tokens are a visible deletion at window close. You feel the sunk cost because you paid for the subscription and any unused token reads as money on the floor.

The result is something more specific than "I want to use the tool". It is "I should use the tool before the window closes". That second motivation is what turns a 2 hour session into a 6 hour one, and it is what produces the 4 hours of sleep pattern Garry Tan and others have publicly described. They are not optimizing for output. They are optimizing for window utilization. The product is scheduling their lives.

Vibe coding tools did not invent any of these mechanics. They inherited them from infrastructure economics and discovered they work even harder on developers than they did on slot players.

Unpredictability & Curiosity

This is the big one. Every prompt is uncertain. Sometimes the model breaks everything. Sometimes it fixes the bug. Sometimes it solves the problem in a way you would never have considered. That variable reward is what turns the loop from "tool use" into "slot machine for builders".

You are not only asking "will this work?". You are asking "what will happen this time?". That second question is what keeps you pulling the lever.

Losses Disguised as Wins

There is a sub-mechanic inside this drive worth pulling out, because once you see it you cannot unsee it. Slot machine researchers have a term called Losses Disguised as Wins. The player bets 10 units. The machine returns 5. The screen flashes, music plays, the win animation runs. The player has lost 5 units, but the brain encodes it as a win. Average slot players see roughly 1000 spins per hour. 680 are real losses. 140 are real wins. 180 are LDWs. The LDWs are what keep people at the table.

Most of what we call "successful" AI code generations are LDWs. The compile is green. The tests pass. The button works. But the implementation uses an end-of-life dependency. Or a library with a known CVE. Or a structure that will be impossible to refactor in three months. Or a pattern that quietly violates the rest of the codebase.

You felt a win. You actually bought deferred debt. The session feels productive because the animation runs. The cost shows up later, when someone else (often a future you) tries to extend the code.

Loss & Avoidance

The hardest time to stop is not after a clean success. It is when the app is broken but feels close. You cannot quit on a broken build. You cannot leave the bug unresolved. You cannot waste the last six hours. You cannot stop when the next prompt might fix it.

This is the Zeigarnik effect with a slot machine attached. Open loops occupy mental space until closed, and vibe coding tools rarely give you a clean closing moment. There is always one more prompt that might resolve the loop. That is how a productive session becomes a compulsive session.

Epic Meaning & Calling

The eighth drive is softer but still present. Non-coders become builders. Developers become solo teams. Ideas that used to be impossible now feel reachable. That identity shift is real and powerful. It also makes the activity feel like a calling, which makes it harder to step away from on a Saturday afternoon.

The white-hat to black-hat slide

Octalysis splits these eight drives along a vertical axis. The top four (Epic Meaning, Accomplishment, Empowerment, Ownership) are called white-hat. They produce sustained motivation, fulfillment, and growth. The bottom four (Social Influence, Scarcity, Unpredictability, Loss Avoidance) are called black-hat. They produce urgency, compulsion, and short-term action.

Vibe coding starts in the top half. You feel creative, capable, in flow. Then debugging starts. The longer the session goes, the more the bottom drives take over. By hour six you are not building anymore. You are avoiding loss, chasing variable reward, and protecting sunk cost.

It starts as flow. It becomes an open loop machine.

When one agent becomes a swarm

The dynamic gets worse, not better, as the tools get more capable. In 2026 the frontier is no longer one developer plus one agent. It is one developer orchestrating four or five agents in parallel. One writes code, one updates documentation, one hunts bugs, one refactors. You stopped being a craftsman. You became an air traffic controller for algorithmic workers moving faster than your attention can track.

A METR study published this year measured experienced developers using AI tools against developers without them. The AI group was 19% slower at task completion. They felt 20% faster. That is a 40 point gap between perceived productivity and actual productivity, and it is the size of the addiction.

Steve Yegge's "Gas Town" experiment is the canonical case. 50 named agents, 189,000 lines of Go in 12 days, no human reviewing the architecture in any sustained way. At one point an agent called Deacon, designed to clean up "stale" worker processes, started killing live workers mid-task and froze the system for days. They called the resulting incident the Murder Mystery bug. Armin Ronacher, the creator of Flask, has a name for this whole class of failure mode. He calls it Agent Psychosis. The pattern is consistent. Developers stop questioning their agents. The agents reinforce each other's mistakes. The output keeps compiling. The system collapses on a timeline measured in weeks.

So what is the conclusion?

I do not think the answer is "vibe coding is bad". The honest conclusion is that motivational architecture is a design choice, and most products do not make it consciously.

Cursor, Bolt, v0 and Claude Code did not set out to build a slot machine. They optimized for fast feedback, broad capability, and visible progress. The white-hat drives showed up first because those are the ones that produce magic. The black-hat drives showed up later because they are the natural shape of compressed feedback loops with variable rewards.

Most products want the top half of Octalysis and ship the bottom half by accident. The companies that did the work to keep their products in the top half (Duolingo until 2023, Strava, Notion's earlier years) generally did it on purpose, with explicit choices about where to refuse engagement leverage.

I build Hatched.live because I think this should be an explicit choice, not an emergent one. If you ship a product, the question is not whether you ship gamification. Compressed feedback plus variable reward plus visible progress already counts. The question is which half of the framework you ship.

If you want to see where your current product sits, hatched.live/audit will score your product against the eight drives for free. It takes about 30 seconds and gives you a Flow Architecture Score plus three concrete recommendations.

The most dangerous part of vibe coding is not that AI is bad. It is that AI is sometimes brilliant. That uncertainty is what keeps you pulling the lever. The same is true for whatever you build next. The lever pulls people. The question is whether the pulling moves them forward or just keeps them at the table.

Disclosure: I build Hatched.live, gamification infrastructure for product teams. This piece grew out of a weekend I could not stop coding.