Dashboard › opencode-lore › Token-budget and long-context accounting
01a0a4b2-8b6a-7700-9b47-549b673a95a4| Project | Hits | Last recalled |
|---|---|---|
| opencode | 1 | 8d ago |
Anthropic max_tokens covers thinking plus visible output. For non-Claude-Code clients, floor it at thinkingBudget + THINKING_OUTPUT_HEADROOM (8192), clamped by model output capacity; an EMA-only floor can let reasoning consume everything and silently end the agent loop with finish:length. Claude Code is excluded; OpenCode does not send x-claude-code-session-id. Thread longContext uniformly through every usage-cap path, even where the current cap appears unreachable, so accounting remains consistent as models and context limits change.