What a matter costs
See both ledgers a matter accrues: a CostEntry for every single model call (tokens, USD, cache buckets, local power) and a billable TimeEntry in 6-minute units for task runs, gate reviews, and AI agent work.
CostContext values
| Context | Where recorded |
|---|---|
task |
Every callModel() / runAgenticLoop() iteration in agents/base.ts |
descriptor |
Need/Offer descriptor Haiku calls in agents/base.ts |
synthesis |
Opus synthesis call in orchestrator.ts |
tabulate |
Tabulate call in orchestrator.ts |
round_goal |
Round-goal generation in orchestrator.ts |
protocol_debate |
DebateProtocol Opus call in protocols/index.ts |
protocol_verify |
VerificationPipeline Haiku ×10 in protocols/index.ts |
tone_analysis |
Every Haiku call in services/toneAnalyzer.ts (attributed to profileId) |
classification |
detectPracticeArea / detectClient / detectNosLegal in services/classifier.ts |