Articles for people who
ship the stack
Rewrites on React, Node.js, TypeScript and AI. A translated body is shown when it exists. If it does not, you see the English text and a note that says so.
Tagged: prompt-caching
Cutting Agent Token Costs: Caching, Routing and Context Hygiene
Shrink LLM agent bills with prompt caching and semantic caching, lazy-loaded tools, model routing and cascades, subagents, and plain old context hygiene.
16 min readSandboxing a Coding Agent and Keeping Its Context Window Lean
Sandbox a coding agent with Seatbelt or Bubblewrap, then keep its context window lean with spill files, stubs, compaction and prefix-cache friendly injection.
10 min readSurviving the Fold: A Ladder for Long-Running Agent Sessions and Compaction
How long agent sessions stay affordable and coherent: the cache tail as rent, five rungs before compaction, delegation as a memory boundary, resume costs.
16 min readContextual Retrieval for RAG: What the 67% Figure Hides, What It Costs and When It Fails
Contextual retrieval for RAG: how situating prefixes fix orphaned chunks, why the 67% figure stacks three changes, what prompt caching saves, and when it fails.
13 min readA Bigger Context Window Will Not Fix Your Agent: Attention Budget and Caching
Context windows behave like an attention budget. Learn how Lost in the Middle works and when to use compression, sliding windows, compaction or prompt caching.
11 min readStructured System Prompts for Rust AI Agents: Layers, Caching, Drift Checks
Build a layered system prompt for a Rust agent: identity, instructions, output rules, examples and fresh context, plus a cache boundary and a fingerprint for CI.
12 min readA Portfolio Chatbot Built to Say "I Don't Know" Instead of Guessing
How a portfolio chatbot stays honest: a locked honesty dial, five handwritten notes in the prompt instead of RAG, and a fixed refusal line that doubles as a gap detector.
8 min readPrompt Cache Misses in Claude Code: Why an 86% Hit Ratio Hides the Cost
A priced model of one iOS-monorepo session shows seven prompt-cache misses outweighing 33 hits, and how to stabilize tools, skills and CLAUDE.md as cache keys.
6 min readWhere Our LLM API Bill Went and the Architecture Changes That Cut It
Step-level token attribution, model tiering, prompt trimming and backoff with jitter cut a coding agent's API costs; includes cost formulas and common optimization mistakes.
8 min read
About these articles
Request a 24h estimate
Need the same stack in a production operator layer? Send the brief — estimate within 24 hours.