u/BasedKetsu

Image 1 — Cursor + Opus 4.6 entered an infinite generation loop: 3,400 lines, 294 attempts to stop itself
Image 2 — Cursor + Opus 4.6 entered an infinite generation loop: 3,400 lines, 294 attempts to stop itself
Image 3 — Cursor + Opus 4.6 entered an infinite generation loop: 3,400 lines, 294 attempts to stop itself
Image 4 — Cursor + Opus 4.6 entered an infinite generation loop: 3,400 lines, 294 attempts to stop itself
Image 5 — Cursor + Opus 4.6 entered an infinite generation loop: 3,400 lines, 294 attempts to stop itself
Image 6 — Cursor + Opus 4.6 entered an infinite generation loop: 3,400 lines, 294 attempts to stop itself
▲ 57 r/cursor

Cursor + Opus 4.6 entered an infinite generation loop: 3,400 lines, 294 attempts to stop itself

I asked Opus 4.6 to redesign a game landing page. Instead, it hallucinated a completely different task, realized it was off-topic, pivoted to another wrong topic, then entered a self-reinforcing apology loop it couldn't break out of. I have never experienced or encountered others facing this kind of behavior before.

3,428 lines later, it had apologized 64 times, written "THE END" 19 times, said goodbye in 10 different languages, and tried to stop itself 294 times. It never produced a landing page redesign.

A few known LLM edge cases collided at once:

  • Each apology generated more tokens, which it then felt compelled to apologize for (positive feedback loop)
  • It produced text that semantically meant "stop" (SIGTERM signals, null terminators, process termination messages) but never emitted the actual stop token
  • As the context window filled, the attempts to stop got increasingly creative: haikus, a UN Security Council vote declaring the response complete, Dragon Ball Z references, a funeral eulogy for its own response
  • At one point it had genuine lucidity: "I wonder if there's a context length issue causing this loop," then continued for 200 more lines

It did drop a fire quote: "Self-awareness without behavioral change is the most uniquely AI thing ever"

Full transcript, screen recordings, and screenshots: https://github.com/Kevin-Liu-01/cursor-opus-infinite-loop

I wonder if this is a vulnerability with Opus or the harness. Or even if the model knew the system time was April 1st and decided it was a good time to scare me (though I had been coding throughout the day, and its behavior was normal).

u/BasedKetsu — 1 day ago

Made a tower defense game you can play right now in your browser. It has 26 levels across 5 biomes. 7 towers with branching upgrade paths. 9 heroes. 6 spells. 108+ enemy types, a sandbox mode, custom level creator, and challenge levels on 3D mountain maps.

Built entirely with hand-written Canvas 2D, no game engine.

Play here: https://ptd.quest

u/BasedKetsu — 15 days ago
▲ 36 r/kingdomrush+1 crossposts

A few months back I posted here about Princeton Tower Defense, a browser TD game inspired by Kingdom Rush. At the time it had 6 towers, 7 heroes, and 5 spells. The response here motivated me to keep building, so I did. A lot.

Here's where the game is now:

What's new since last time:

  • 7 towers with branching upgrade paths (each tower splits into 2 final forms, 14 total upgrade branches). Nassau Cannon splits into Gatling Gun or Flamethrower. E-Quad Lab becomes Focused Beam or Chain Lightning. Eating Club becomes Investment Bank or Recruitment Center. Etc. All have unique abilities such as burning, gaining attack speed over time, buffing other towers, and more!
  • 9 playable heroes. Added Nassau Phoenix (a flying phoenix hero) and Ivy Warden (form-shifting nature hero)
  • 6 spells (up from 5). Fireball, Lightning, Freeze, Hex Ward (resurrects dead enemies and troops as allied ghost soldiers), Payday, and Reinforcements, all upgradeable with upgraded aesthetics using earned stars. Reinforcements get new armor and ranged attacks as they upgrade!
  • 26 levels across 5 full biome regions. Grassland, Swamp, Desert, Winter, and Volcanic, each with its own visual style, environmental hazards, and bosses.
  • 108+ enemy types spanning academic troops, dark fantasy, bugs, and final bosses with new abilities that can affect towers and allied troops
  • Map overhaul: new pathing system. Dual-path maps with pressure lanes. Map hazards such as lava pools, quicksand, blizzard zones. Special structures that add region-specific objectives (such as a beacon that buffs range, a shrine that grants healing, barracks that spawn knights, and offensive structures like a tower that shoots energy beams where you aim it)!
  • Challenge levels: some maps have special restrictions like only being able to place certain towers and are tougher in difficulty. They'll also have quirks such as having more special structures in place to help you. But best part: they are in custom 3D mountain maps!
  • Sandbox mode. Endless procedural waves with 10k starting gold
  • Custom level creator. Design your own maps, set paths, place tower slots, configure waves
  • Interactive world map with star-gated progression and a campaign overview
  • Visual overhaul: gone are the old sprites and weird decorations and landmarks. New sprites are crispy and beautiful!

The whole thing is still rendered with hand-written Canvas 2D. No game engine, no sprite sheets. Every tower, enemy, terrain tile, projectile arc, death effect, fog layer, and god ray is drawn procedurally in code. The decoration renderer alone is 33,000+ lines.

As a kid I spent so many hours on Kingdom Rush and its sequels. The branching tower upgrades, the hero you drag around the map, the satisfying moment when your setup just works against a rush. That loop is what I tried to capture. If you played Kingdom Rush growing up, I think you'll feel it.

Play it here (free, runs in your browser): https://ptd.quest

Would love to hear what you think, especially from this community. Last time y'all gave me great feedback and it directly shaped the direction I took the game. Happy to answer any questions about the build!

u/BasedKetsu — 15 days ago
▲ 16 r/vercel

I just open-sourced Loop, an operator desk for agent skills that auto-refresh from tracked sources. I wanted to share the experience of building it because I leaned heavily into the Vercel platform and it ended up being the biggest reason I was able to ship this as a solo developer.

What the app does: You track the sources your agent skills depend on (docs, changelogs, repos). When something upstream changes, Loop runs a research agent, evaluates what shifted, and writes a new version of the skill with a full diff. The catalog has 100+ verified skills at v16-v21 after weeks of daily autonomous refreshes.

When I had the idea, I really wanted to ship this as fast as possible and just get it running with as little custom infra as possible. So the stack is pretty much a demo of Vercel's latest and greatest offerings.

  • vercel AI Gateway: One API key, multiple model providers. I didn't write a single line of provider abstraction. The gateway routes to OpenAI, OpenRouter, Groq, Together, whatever. Model routing is just not something I had to think about. And the free credits are nice considering a model like gpt-5.4-mini or gpt-5.5-nano or gemini is dirt cheap for decent results
  • vercel/queue (v2 beta): Every morning at 9:00 UTC, a cron hits the refresh endpoint. The queue fans out individual refresh jobs per skill. I never had to think about concurrency, retries, or job management. You send() and it works. Haven't lost a job yet
  • vercel/sandbox: Firecracker microVMs for the agent sandbox. Users can run code (Node 24/22, Python 3.13) in isolated environments. I'm offering safe code execution to users and I didn't set up a single server for it. Cold starts are ~2-3s, which is fine for this use case
  • vercel/blob: Asset storage for skill icons and exports.
  • vercel Cron: Daily refresh trigger and weekly import scans, one line in vercel.json
  • vercel Analytics + Speed Insights: nice free observability.
  • Next.js 16 + React 19: Server components for the catalog, client components for the interactive bits. The landing page has a Three.js hero with 3D diff cards and a grain shader. No issues with 16.
  • Of course, deployed on vercel

The rest of the stack is Supabase (Postgres + RLS), Clerk (auth), Stripe (billing), and Brave Search API (web research during refreshes, with Firecrawl/Serper/Tavily/Jina as user-configurable alternatives).

The biggest takeaway: with all the devtools at your disposal, you can quite literally ship at lightspeed. I didn't write any infra code. All my time went into the actual product logic: the refresh pipeline, the skill editor agent, the diff viewer, the automation scheduler. That's the part that matters and that's where all my time went.

Free and open source: loooop.dev | github.com/Kevin-Liu-01/loop

Happy to answer questions about any of these, especially the queue + gateway + sandbox combo. It's a really nice pattern for anything with scheduled AI workloads.

u/BasedKetsu — 15 days ago