vibeinging/dsh-agent-budget

Native Harness agent-tree token budget plugin

Gives one live agent session — or its complete local descendant tree — a durable token limit and an absolute deadline. It reserves capacity before every attributed llm/stream provider attempt and replaces that estimate with provider-reported usage once the stream settles, so concurrent child agents cannot all spend the same remaining balance. Scopes are restored through the DSH Storage Domain, deadlines survive a restart with fail-closed recovery when dispatched usage is unknown, a human controls budgets with /budget, and output convergence reduces maxTokens as a bounded account approaches exhaustion. The README notes the shipped bundle disables the model-facing tools and gives direct human control to a command subpath.

Agent Capabilities ★ 2 updated 2026-08-12 ⏳ pending
View on GitHub ↗

Install

dsh plugin --profile web add -w github:dsh-external/dsh-agent-budget#<pinned-commit>

README's 'From a pinned GitHub commit' block quoted verbatim: the # is followed by the reviewed commit to install, and the -w flag is required because a DSH profile is a pnpm workspace root. The README's source of truth is the private dsh-external/dsh-agent-budget repository and it also documents a local-checkout form (dsh plugin --profile web add -w . followed by dsh --profile web --dump-config) and a removal form. Its .npmrc selects the private @deepseek-ai/* scope, so installation needs Git credentials and pnpm 11; registry check 2026-09-17 returned 404 for @deepseek-ai/dsh-agent-budget, consistent with the private-repository route.

Compatibility

README: an out-of-tree DSH bundle for a single Host process. The shipped web and headless profiles already provide the Storage, Storage Domain, Token Meter and command services it requires, while a custom profile must provide those services itself. The README is explicit about the guarantee: a hard budget refuses new provider attempts before dispatch, but it is not an exact billing system and does not forcibly cancel work already in flight.

Details

Recent updates

The README documents the budget semantics, the service API and the model-experience notes rather than a release-by-release table.

FAQ

How do I install it?
The README installs from a pinned commit with dsh plugin --profile web add -w github:dsh-external/dsh-agent-budget#<commit>, or from a local checkout with dsh plugin --profile web add -w .; the -w flag is required because a profile is a pnpm workspace root.
Is the budget an exact billing limit?
No — the README says a hard budget refuses new provider attempts before dispatch, that it is not an exact billing system, and that it does not forcibly cancel work already in flight.
Does it survive a restart?
Per the README the session and descendant-tree scopes are durable through the DSH Storage Domain, absolute deadlines survive restart, and recovery is fail-closed when dispatched usage is unknown.

More plugins in Agent Capabilities

Browse more in Agent Capabilities

Guides for Agent Capabilities plugins