Skip to content

safety: enforce a hard spend/turn cap before headless sessions #8

Description

@lorenzoliuzzo

Part of the fleet milestone (#1 §4).

Gap

Spend/usage guardrails are ad hoc: fleet_usage.py parses transcripts for
denials after the fact. There's no hard per-run / per-day token or dollar cap
enforced before a headless session starts — and --execute runs real paid
sessions across two accounts concurrently.

Do

  • A --max-cost / --max-turns guard in fleet_dispatch.py enforced before
    a session launches (and aborting a session that exceeds it).
  • Optional: a per-day org budget ceiling.
  • Consider a MyGuard policy rule so the cap is a first-class invariant.

Acceptance

A run that would exceed the cap is refused (or halted) before spend, with a
clear message; covered by a test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    safetyFleet safety / process gap

    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