Token budget controls
Keep long unattended agent sessions from burning through your budget.
Set these up before first use
Long unattended agent sessions can consume significant tokens. Provider-side limits are the only control that cannot be talked past by an agent, so start there.
Set provider-side limits first
A monthly soft limit plus a hard usage cap in your provider dashboard:
- OpenAI: platform.openai.com/account/limits
- Anthropic: console.anthropic.com
- Google AI Studio: aistudio.google.com/app/usage
Route models by task type
Use a fast, cheap model for orchestration and status loops; reserve expensive models for implementation only. This is what the plan / build / fast tiers are for.
Install the quota plugin
@slkiser/opencode-quota adds /quota and
/quota_status, which surface real-time token usage inside OpenCode sessions.
Use /quota checkpoints
Run /quota before starting any /plan-apply session and after each agent wave. Pause at 75
percent consumed; stop at 90 percent.
Confirm before large runs
The onboarded /plan-apply workflow asks for confirmation before spawning agents for Medium (4 to 7
tasks) or High (8 or more tasks) scope sessions.