Token-efficient main-session + Thread agent architecture: weak router, strong workers, smart caching
dotey · x · 2026-11-16
Addressing the concern that single-main-session bot interactions burn through quota, dotey shares a token-efficient main-session + Thread architecture:
- Use a weak model for the main session: its job is triage and routing, like a company receptionist — a Sonnet-tier model suffices; use stronger models for Thread subtasks, ideally with the main session picking models by task difficulty (he runs Sonnet for the main session and Opus for subtasks in Claude Project).
- Split Prompt Caching strategy: the main session gets sporadic messages, so when cache expires don't resend full history and tool calls — send only the latest few messages plus a session retrieval tool to rebuild context. Threads behave like concentrated sessions with high cache hit rates, so the best move is compressing context right before expiry (e.g., at minute 50 of a 1-hour cache).
More from coding & agent
- Musk shows Grok Bot auto-editing 23-hour Starship livestream into highlight reel — elonmusk · 2026-11-16
- Open-source CAD SolidCraft 0.42 ships KiCad import and MCP support for AI agents — philfung · 2026-11-16
- OpenFill's Baby adds AI object selection and MiniMax H3 inpainting to ComfyUI — shukanimator · 2026-11-16
- Investors: personal AI agents are the next ChatGPT moment, jobs become agent management — thisiskp_ · 2026-11-16
- Non-programmer builds 24-car battle royale Android game with Claude Code — AstraNoms · 2026-11-16
- One prompt to Claude generates an interactive lift-the-flap storybook in a single HTML file — Correct-Ad4910 · 2026-11-16