Repository navigation
Token Management
Ankit Jha edited this page May 29, 2026
·
1 revision
Claude Code is the orchestrator. If its context fills up, everything stops. Hydra enforces a strict tiered response to rising token usage.
claude_pct |
Mode | Actions |
|---|---|---|
| 0–49% | normal | Full orchestration, all features active |
| 50–64% | compact | Run /compact — recommended now |
| 65–69% | caution | Run /compact URGENTLY. Stop self-reviewing agy output |
| 70–74% | warning | Downgrade all tasks 1 tier. Freeze escalations |
| 75–79% | critical | Routing only. Only CORE if truly necessary |
| 80%+ | emergency | STOP all generation. Route to Qwen. Start new session |
Rule: Run /compact proactively at 50%. Too late after 75%.
The 70/75/80% rule applies to all models. route.sh enforces via fallback chains:
model_token_thresholds:
warn_at_percent: 70
fallback_at_percent: 75
hard_limit_percent: 80dispatch/route.sh --status
# Claude token usage : 52% [mode: compact]
# Exhausted pools : noneWhen a pool runs out:
agy_claude exhausted → skip T2, T3 → try T4 (Flash Thinking) → T5 (Pro) → T10 (Qwen)
agy_flash exhausted → skip T4,T7,T8,T9 → T10 (Qwen) only
Qwen (T10) is always available — it runs locally regardless of API state.