[FEATURE] Keep prompt suggestions when rate-limit status is allowed_warning — no override today
What
Prompt suggestions (the ghost-text next-step guess in the input box) are suppressed for the rest of a session once the account's rate-limit status leaves allowed — which happens well before any limit is actually hit. There is no setting, env var, or flag that lets a user opt back in.
I'd like a way to keep suggestions on in that state, accepting whatever extra usage they cost.
Where it happens
In the CLI binary (v2.1.223) the suggestion gate is:
function avy(e){
if(!e.promptSuggestionEnabled) return "disabled";
if(e.pendingWorkerRequest||e.pendingSandboxRequest) return "pending_permission";
if(e.elicitation.queue.length>0) return "elicitation_active";
if(e.toolPermissionContext.mode==="plan") return "plan_mode";
if(qle().status!=="allowed") return "rate_limit";
return null;
}
Any non-allowed status short-circuits generation. That includes allowed_warning, which is not a block on anything else — requests still go through normally.
allowed_warning is set either from the server's anthropic-ratelimit-unified-<window>-surpassed-threshold header, or from the client's own pace table:
VP_=[
{rateLimitType:"five_hour", claimAbbrev:"5h", thresholds:[{utilization:0.9, timePct:0.72}]},
{rateLimitType:"seven_day", claimAbbrev:"7d", thresholds:[{utilization:0.75, timePct:0.6},
{utilization:0.5, timePct:0.35},
{utilization:0.25, timePct:0.15}]}
]
So on a heavy day the suggestions vanish somewhere around 75–90% utilization of a window and stay gone until it resets, even though the session is otherwise fully usable.
Why this matters
The warning state is the point where the suggestions are most useful, not least. When usage is tight I want to keep momentum and pick the next step in one keypress rather than compose it. The suggestion is a small background request that reuses the parent conversation's prompt cache, so the marginal cost is low compared to the turn it belongs to — and the docs say as much.
The promptSuggestionEnabled setting and CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION env var only sit above this check in the same function, so they can turn suggestions off but never keep them on.
Proposed
Either of these would solve it:
- Treat
allowed_warningasallowedfor suggestion generation, and gate only onrejected. The warning state doesn't block anything else in the session. - Add an opt-in escape hatch — a
promptSuggestionEnabled: "always"value, or a separate setting / env var — that skips therate_limitbranch for users who want to spend the tokens.
Docs gap
Interactive mode → Prompt suggestions documents the skip conditions as: cold prompt cache, after the first turn of a conversation, and plan mode. It doesn't mention the rate-limit state at all. Right now the behaviour reads as a bug — suggestions just stop appearing partway through a working day with no explanation. Worth documenting regardless of whether the gate changes.
Related
- #74826 — asks for a frequency / always-on mode. Adjacent but about the cold-cache skip, not this gate.
Environment
- Claude Code 2.1.223, macOS (Darwin 25.5.0, arm64), installed via Homebrew cask
- Terminal, interactive mode
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗