opencode-mission-control
opencode-mission-control copied to clipboard
feat: add token tracking and budget warnings
Description
Deferred from v1.5 release. Implement token usage tracking and budget warning system.
Background
In v1.5, we implemented the permission policy engine (#69) without token/cost tracking. This issue covers the remaining cost-related features that were explicitly deferred.
Requirements
- Track token usage per job via SSE message events
- Configurable budget limits per job and per plan
- Warning notifications when approaching budget thresholds
- Budget enforcement: pause/stop jobs exceeding limits
- Cost estimation based on model pricing (configurable)
- All tracking OFF by default, configurable via MCConfig
Related
- Deferred from: #69
- Builds on: #65 (serve-mode SSE events provide token metadata)