Repository context cost
Repository Context Token Cost Calculator
Repository context is one of the biggest hidden cost drivers in AI coding. A small output can still be expensive if the agent repeatedly reads large amounts of code.
Best use cases
- Estimating the cost of including many files in an AI coding session.
- Testing whether prompt caching can reduce repeated context cost.
- Deciding when to narrow context before starting an agent workflow.
Inputs to estimate
- Tokens from selected files and documentation.
- Repeated context across agent turns.
- Cached input share and cache write cost.
- Output generated after reading the repository.
How to calculate it
Open the AI Coding Agent Cost Calculator, choose the closest editable preset, then adjust task volume, token size, cached input, and subscription assumptions. Use the result as a planning estimate, not a billing statement.