Why tokens disappear fast
Claude Code sessions grow expensive when the model re-reads large files, re-explores the repo each turn, or carries long chat history. The fix is not a single setting: it is giving the agent a map and a process that avoids redundant context.
Use a local codebase map first
AgenKit Local Memory builds a deterministic index on your machine. Agents query file:line pointers instead of opening whole trees. Phase 0 Orient refreshes that map before /agenkit runs.
- Run npx agenkit memory status when answers feel stale
- Let /agenkit Orient run before large tasks
- Prefer memory query over broad grep in chat
Keep tasks scoped
Split work into approval-gated phases (spec, architecture, plan, build). Smaller prompts with clear file paths beat one giant instruction that forces the model to search.