Skip to content

Feature request: opt-in spend guardrail (budget thresholds + statusline warning + optional notification) #1185

Description

@dpanbug

Motivation

A few weeks ago a long agent session on a premium model (Claude's Fable) quietly burned ~$100 in a couple of hours, and I only noticed the next day. That's literally what sent me looking for a tool — and how I found AgentsView. It's now my daily driver: it replaced ccusage for cost, and I lean on the cross-session search constantly to dig up old conversations (honestly better than the native one). I love it.

But the cost side is retrospective: it shows me where the money went after it's gone. The one thing that would've caught my $100 evening is a proactive nudge — and AgentsView, which already computes every number, is the natural home for it.

Proposal

An opt-in guardrail on the existing cost tracking:

  1. Budget thresholds per period (daily / weekly / monthly) in config.toml. Off by default.
  2. Statusline stateagentsview usage statusline gains normal → warn → critical as you approach / cross the limit (color + a small marker). No change when no budget is set.
  3. Optional local-first notification when a threshold is crossed — a generic webhook (and/or ntfy / a Telegram bot token). No third-party SaaS required; nothing added to the default config.

Scope

Observability-only: it reports / notifies, it never throttles or blocks an agent (AgentsView reads sessions, it doesn't control them). A natural extension of the money tracking that's already the core value. Everything stays off unless a budget is configured, and notification targets are user-supplied endpoints — consistent with AgentsView's local-first, no-telemetry stance.

Offer

Happy to implement it and open a PR if you'd accept the direction. I'd value a quick steer on two points: where you'd want the threshold config to live, and whether the notification layer belongs in scope or as a follow-up. Thanks for building this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions