refactor: drop the inert per-agent budget_usd_per_month cap - #529
Merged
Conversation
The budget system was cold-spawn enforcement (the daemon's gate_budget checked accumulated spend before each claude -p dispatch). With the daemon removed, agents are resident sessions mycelium never meters, so the field became a cosmetic cap nothing reads. Removes budget_usd_per_month from the CLI manifest/dispatch facets, the --budget flag, the backend schemas + principal roll-ups, and the frontend API types, plus the owner/team roll-up displays and docs that summed it. Stacked on the daemon-removal branch (#526) per the issue's dependency note, to avoid editing budget code in daemon/dispatch.py that PR already deletes.
engines.py (native engine invite, added after this branch was cut) still wrote budget_usd_per_month into the manifest and passed it to AgentRead — reconcile it with the field's removal so the route keeps working.
juliarvalenti
force-pushed
the
claude/github-issue-525-ex0pk8
branch
from
August 15, 2026 02:28
6f08995 to
f96fc87
Compare
juliarvalenti
changed the base branch from
refactor/remove-daemon-cold-spawn
to
main
August 15, 2026 02:28
Contributor
Author
|
Rebased onto main now that #526 has landed (used |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes
budget_usd_per_month, the per-agent monthly-spend cap that used to be enforced by the now-deleted daemon (gate_budget()indaemon/dispatch.py, checked before eachclaude -pcold-spawn). With cold-spawn gone, agents are resident sessions mycelium never meters, so the field had become a cosmetic manifest cap nothing reads — reporting a cap, not spend, and inviting false confidence ("this agent is capped at $5/mo" — it isn't).Changes
CLI
protocol.py: dropAgentManifest.budget_usd_per_monthcommands/agent.py: drop the--budgetflag,budget=plumbing throughbuild_manifest, the Budget column inagent ls, the budget line inagent show, and the summed-budget return fromload_owned_agentscommands/user.py: drop the summed-budget display inuser show/whoami(text + JSON)commands/engine.py,integrations/{base,claude_code,cursor,engine}/dispatch.py: drop thebudgetparam onbuild_manifestdocs/principals.md: drop the "Cost roll-up" sectionBackend
schemas.py,routes/agents.py,routes/users.py,services/principals.py: dropbudget_usd_per_monthfield + the summed-budget roll-up on users/teamsFrontend
lib/api.ts: dropbudget_usd_per_monthfromAgentSummary,OwnedAgent,User,TeamDocs
docs/concepts.html+docs/llms-full.txtfrom the updatedprincipals.mdsource (docs/generate_docs.py)Why stacked on
refactor/remove-daemon-cold-spawn(#526)Issue #525 explicitly depends on the daemon-removal PR landing first ("best done right after it lands so we're not editing the same manifest surface twice") — that PR deletes
gate_budget()and the accumulation indaemon/dispatch.py/daemon/state.py. Since #526 was still open when this was picked up, this branch is based onrefactor/remove-daemon-cold-spawnrather thanmainso the two don't collide. Retarget tomainonce #526 merges.Testing
uv run pytest tests/ -x -q) — CLI: 272 passed; backend: 407 passed, 6 skippeduv run ruff check .) — both CLI and backenduv run ruff format --check .) — both CLI and backenduv run ty check .clean (CLI + backend; only a pre-existing unrelatednegmasimport note in the sandbox)tsc --noEmitcleantest_slim_l9_wire.py, both sides)Related Issues
Closes #525
Generated by Claude Code