claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[FEATURE] Auto-reduce effort at 90% usage, auto-fallback to smaller model at 95%

Open MMWilliams opened this issue 2 months ago • 2 comments

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 from xhigh toward medium/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. Checked settings.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:

  1. A native setting (e.g. usageThresholds: { effortReduceAt: 90, modelFallbackAt: 95, fallbackModel: "haiku" } in settings.json), or
  2. 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.

MMWilliams avatar Sep 11 '26 19:09 MMWilliams

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

Image

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

gabgoss avatar Sep 13 '26 13:09 gabgoss

Closing for now — inactive for too long. Please open a new issue if this is still relevant.

github-actions[bot] avatar Nov 19 '26 22:11 github-actions[bot]