Skip to main content
Kiran Brahma
All writing

O9X Build Log 6: The 100K Token Trap

Published Part 6 of O9X Build Logs Personal Essays

AI does not learn my business. It only holds onto my instructions until its context window starts to slip.

I spent several weeks building schema with AI on smaller projects, and the same pattern showed up every time. I describe a problem, the AI suggests a table, and I iterate. Past the 20-minute mark, things start to break. Even with advertised 1.5M+ token windows, performance drops past roughly 100K tokens. The model forgets a constraint, drops a primary key, or introduces a variable that contradicts the logic from 40 minutes earlier. Google's Gemini behaves the same way once I move from a front-loaded context into a long rolling chat.

This is context rot. In an ERP covering attendance, sites, guard rotations, and invoices, the database foundation has to be exact because one schema mistake breaks every feature built on top of it. Asking AI to evolve that foundation while holding an entire conversation history is the wrong setup. The scope grows too wide, the context degrades, and the outputs stop matching the constraints I set at the start.

I fixed this by switching to the BMAD-METHOD, a spec-first workflow built around sharding. Instead of relying on one long chat that slowly degrades, I split the project into small, static documents. I wrote an initial PRD and a project brief using the BMAD structure and locked both before writing any application logic. Each new phase starts in a fresh session where the AI only sees the specific shard it needs, which keeps the context small and the outputs aligned with the spec. I did not adopt the full workflow at once. I kept the scope narrow from day one because I knew the system would need corrections along the way.

Now, whenever a single AI session runs past 20 minutes on a project, I stop. I extract the full logic into a static markdown file using this prompt:

Provide a complete report of everything established in this conversation. The output must contain all assumptions, constraints, structures, and decisions so a new AI instance can continue without loss.

Then I open a fresh session, feed only that file as context, and keep going. Relying on static files instead of rolling chat memory keeps the logic from drifting.