Founder finds Codex wrote quadratic length-checking code that crashed his Supabase edge function
burkov · x · 2026-09-09
ChapterPal developer burkov shares a cautionary tale about reading vibe code: Codex implemented a book-digest algorithm so inefficiently that Supabase killed the edge function for exceeding CPU limits. To check whether appending a paragraph would exceed the 100K-character cap, Codex concatenated the entire digest with each candidate paragraph and measured the resulting string — instead of just adding the two known lengths.
Replacing the length measurement with a simple A+B addition fixed it instantly. His takeaway: AI-generated code is full of these choices, "and that's OK — just be aware and don't make it responsible for running a nuclear factory."
More from coding & agent
- Astra ports Super Smash Bros Melee to macOS at 120 FPS after 6-hour agent loop — banteg · 2026-09-09
- FreeBots World goes live: mint AI bots that build on your land in real time — Daniel_Farinax · 2026-09-09
- First Game Built via Chat with Spawn's AI Programmer: Drift Racing World — majidmanzarpour · 2026-09-09
- One prompt, one playable world: Astra + Thrixel build a Three.js alien marketplace — RanaHanocka · 2026-09-09
- Evals are the new PRD, but they still can't tell you if you built the right thing — rseroter · 2026-09-09
- 'The Great Refactor': civilization-scale code auditing and refactoring ahead — kovasb · 2026-09-09