Skip to content

A maxUsd budget refuses every sandbox child because the tangle provider path reports unknown dollar cost #1240

Description

@drewstone

What happened

A pursuit registered with supervise.budget = { maxIterations: 960, maxTokens: 160000000, maxUsd: 300 } on runtime 0.225.5 lost 3 of its first 4 children at settlement:

budget pool: ticket 1 reported unknown dollar cost under a dollar-capped budget (…:s1)
budget pool: ticket 2 reported unknown dollar cost under a dollar-capped budget (…:s2)
budget pool: ticket 3 reported unknown dollar cost under a dollar-capped budget (…:s3)

Run: capability-per-parameter-cpp-ds-20260915b (records retained). The children were ordinary literature-graph workers on tangle-sandbox; their settled spent reads usd: 0, usdKnown: false, as every sandbox child's did on the earlier runs too (usd=$0.00 billed=unmeasured in disco report).

The pool is right; the reporting is the defect

Refusing to count unknown as zero under a capped budget is correct and should stay. The problem is upstream: the sandbox/provider path never reports dollar cost for a child, although the cost is on the wire. The Tangle router returns usage.cost on every completion (a director's own call log shows non-zero usage.cost per call), and run-level totals are only ever provenance: estimated.

So today a dollar cap is unusable with the fleet, which means the only enforced ceiling is the token pool — and that pool counts re-sent context on every turn, so it does not bound money either.

Ask

Carry the router's usage.cost from the provider result into the child's spent.usd with usdKnown: true (agent-provider-tangle reports usage tokens today; the cost field is beside them in the same response). Where a route genuinely has no cost, keep usdKnown: false and let the cap refuse — that is the pool doing its job.

Until then, maxUsd should be documented as incompatible with sandbox children, because the failure mode is every child dying with a pool error that reads like an accounting bug.

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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