[FEATURE] Auto-reduce effort at 90% usage, auto-fallback to smaller model at 95%
Feature request
Automatically reduce reasoning effort as usage approaches a plan/session limit, and automatically switch to a smaller model past a higher threshold, rather than requiring the user to notice and act manually.
Suggested default shape (configurable):
- At ~90% of usage: progressively lower
effortLevel(e.g. step down fromxhightowardmedium/low) rather than an all-or-nothing switch. - At ~95% of usage: fall back to a smaller/cheaper model automatically (e.g. Sonnet → Haiku) to stretch remaining budget instead of hitting a hard stop.
Why
Right now effortLevel and model in settings.json are static values read at session start. There's no way to react to usage state at all:
- No hook event fires on usage/quota thresholds (hooks only cover session lifecycle:
SessionStart,UserPromptSubmit,Stop, etc.) - No file under
~/.claude/persists a live usage percentage that an external script could poll. Checkedsettings.json,daemon.status.json,telemetry/,cache/— none carry it. - The usage number only exists inside the running CLI process itself, with no exposed API/hook surface for it.
So today a user who wants to avoid hard-stopping mid-task has no automated way to gracefully degrade (effort first, then model) as they approach a limit — they have to watch usage manually and run /model / adjust effort themselves, or just get cut off.
Ask
Either:
- A native setting (e.g.
usageThresholds: { effortReduceAt: 90, modelFallbackAt: 95, fallbackModel: "haiku" }insettings.json), or - At minimum, expose current usage percentage somewhere pollable (a file, or a new hook event fired on threshold crossings) so this could be built as a user-side hook instead.
Option 1 is the better UX since it avoids a polling hack, but option 2 would at least make it possible to build.
Hi, I saw your post a couple of days ago, and I feel the same way. So after a little bit of research, it seems like Anthropic has released a status line feature, and I made a plugin for it that solves this issue for me: https://github.com/gabgoss/totalizer-for-claude-code
You don't need to use mine, there are many more plugins that do this very well. Look for "status line" online, or you can build your own: https://code.claude.com/docs/en/statusline
Closing for now — inactive for too long. Please open a new issue if this is still relevant.