Skip to content

[Enhancement] Pre-limit usage alerts and webhooks — notify users before session/weekly budgets are exhausted #1494

@daskuntal75

Description

@daskuntal75

Summary

Claude provides no warning before a usage limit is reached. Sessions stop when a budget is exhausted with no advance notice. There is no programmatic way to subscribe to limit events or throttle automation before hitting hard stops.

Use cases blocked

  1. User mid-way through a long debugging session hits weekly limit unexpectedly — work lost, session state gone
  2. Developer building on the API has no way to alert end users before rate limits degrade service
  3. Automation tooling cannot self-throttle based on budget proximity

Proposed solution — two tiers

Tier 1 (UI only, low effort)

Email/push notification when session or weekly budget reaches a configurable threshold (default: 80%). Opt-in in account settings.

Tier 2 (API, higher effort)

Webhook or SSE endpoint firing on budget threshold events:

{
  "event": "budget_threshold",
  "limit_type": "weekly_all_models_budget",
  "threshold_pct": 80,
  "current_pct": 81,
  "resets_at": "2026-05-11T10:00:00Z"
}

Minimum viable version (lowest effort)

Add an X-Budget-Remaining-Pct response header to every API call:

X-Budget-Remaining-Pct-Session: 23
X-Budget-Remaining-Pct-Weekly: 41

This lets developers build their own alerts without requiring Anthropic to implement full webhook infrastructure.

Reference

https://github.com/daskuntal75/llm-cost-kit/blob/main/docs/anthropic-issues-submit-ready.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions