Skip to content

Direct budget control: read/set the cap via a bridge endpoint (companion to Scout#56) #1

Description

@jordanrburger

Type: feature. Companion to Raven-Scout/Scout#56 (Mac app) and the iOS companion.

Request

Add direct budget control to the Android app — view the real spend cap and set/change it from the phone — consistent with the Mac and iOS apps. Today Android can spend against and bypass the budget, but can't set it.

Current state (Android)

Android is the best-positioned surface for true control because the Mac-side bridge wraps scoutctl:

  • The bridge pre-checks budget before launching a run (bridge/run_launcher.py _default_budget_check()); over-budget bubbles up to the app as over_budget → the "Over budget" / "Run anyway" dialog in ui/controlcenter/ControlCenterScreen.kt (ControlCenterViewModel.BudgetPrompt).
  • The bypass path is fully wired: bypass_budget in data/api/Dto.ktScoutApi.runNow/retryRunscout_bridge.pySCOUT_BYPASS_BUDGET.
  • Control Center's GET /status already surfaces today's token spend.

So the app reads spend and can bypass the cap, but there is no endpoint or UI to read the configured cap or change it — the only lever is the one-off "Run anyway".

Scope to design

  • Bridge endpoint to get/set the budget via scoutctl (e.g. GET/PUT /api/v1/budget) — read the configured cap(s), write a new value, authenticated by the existing bearer secret. This is the canonical write path (the bridge already owns scoutctl).
  • App UI: show configured cap vs today's spend in Control Center, and an edit control (Settings or Control Center) to change the daily (and optionally window/weekly/monthly) cap; confirm-on-raise.
  • Granularity: decide daily vs window vs per-session-type caps (logs already show window budgets, e.g. "Daily budget: $150, Window budget: $18.75").
  • Turn the "Over budget" dialog into more than bypass: offer "raise the cap" alongside "Run anyway", and make the change persist via the new endpoint instead of a per-run override.
  • Validation (min/max, currency/locale) and surfacing where the value was written.

Shared contract

The budget's source of truth is engine config (via scoutctl), not a per-app value — the bridge should be the one writer that Mac and (eventually) iOS agree with. Whatever Scout#56 settles on for where the cap lives and how it's written is the contract; the bridge endpoint here implements the write side of it. Cross-ref: parent Scout#56, iOS companion (linked below).

Captured from session notes 2026-06-23.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    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