Sponsored
THREADS)
A 40-step agent thread re-sends its whole history on every call: 2.17M input tokens for an 85K-token transcript. Prompt caching turns those re-sends into 0.1x reads, but only if the prefix stays byte-stable, so it shapes the entire architecture. Viktor's thread engine: tools as SDK functions instead of schemas in the prompt, append-only threads, compaction that runs inside the thread's own cache. Same thread on Opus 4.8: $11.35 without caching, $2.07 with. Production code included.