My AI Read a JSON File from Disk 900 Times in a Loop (And Why No Linter Can Save You)

Last week my AI wrote code that read a JSON file from disk, parsed it, did one lookup, and repeated this 900 times inside a for loop. Each iteration: open file, decode JSON, look up a value, throw it all away. Start over. It’s a mistake I teach my students not to make within their first month of programming. What happened (straight to the point) I’m building Tokamak, a macOS menu bar app that monitors Claude Max quota. Part of the functionality scans ~900 JSONL files from Claude Code sessions. For each file, it needs to know the byte offset where it left off last time (incremental reading — only process what’s new). ...

February 24, 2026 · Fernando