Skip to content

refactor: drop the inert per-agent budget_usd_per_month cap - #529

Merged
juliarvalenti merged 2 commits into
mainfrom
claude/github-issue-525-ex0pk8
Aug 15, 2026
Merged

refactor: drop the inert per-agent budget_usd_per_month cap#529
juliarvalenti merged 2 commits into
mainfrom
claude/github-issue-525-ex0pk8

Conversation

@juliarvalenti

Copy link
Copy Markdown
Contributor

Summary

Removes budget_usd_per_month, the per-agent monthly-spend cap that used to be enforced by the now-deleted daemon (gate_budget() in daemon/dispatch.py, checked before each claude -p cold-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: drop AgentManifest.budget_usd_per_month
  • commands/agent.py: drop the --budget flag, budget= plumbing through build_manifest, the Budget column in agent ls, the budget line in agent show, and the summed-budget return from load_owned_agents
  • commands/user.py: drop the summed-budget display in user show / whoami (text + JSON)
  • commands/engine.py, integrations/{base,claude_code,cursor,engine}/dispatch.py: drop the budget param on build_manifest
  • docs/principals.md: drop the "Cost roll-up" section

Backend

  • schemas.py, routes/agents.py, routes/users.py, services/principals.py: drop budget_usd_per_month field + the summed-budget roll-up on users/teams

Frontend

  • lib/api.ts: drop budget_usd_per_month from AgentSummary, OwnedAgent, User, Team

Docs

  • Regenerated docs/concepts.html + docs/llms-full.txt from the updated principals.md source (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 in daemon/dispatch.py/daemon/state.py. Since #526 was still open when this was picked up, this branch is based on refactor/remove-daemon-cold-spawn rather than main so the two don't collide. Retarget to main once #526 merges.

Testing

  • Unit tests pass (uv run pytest tests/ -x -q) — CLI: 272 passed; backend: 407 passed, 6 skipped
  • Linting passes (uv run ruff check .) — both CLI and backend
  • Format check passes (uv run ruff format --check .) — both CLI and backend
  • uv run ty check . clean (CLI + backend; only a pre-existing unrelated negmas import note in the sandbox)
  • Frontend tsc --noEmit clean
  • CLI↔backend SLIM+L9 wire-contract test unaffected (test_slim_l9_wire.py, both sides)

Related Issues

Closes #525


Generated by Claude Code

claude and others added 2 commits August 14, 2026 19:26
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
juliarvalenti force-pushed the claude/github-issue-525-ex0pk8 branch from 6f08995 to f96fc87 Compare August 15, 2026 02:28
@juliarvalenti
juliarvalenti changed the base branch from refactor/remove-daemon-cold-spawn to main August 15, 2026 02:28
@juliarvalenti

Copy link
Copy Markdown
Contributor Author

Rebased onto main now that #526 has landed (used --onto to drop the daemon-removal commits this branch carried, which are already on main squashed) and retargeted the base main→. One reconciliation: routes/engines.py (native engine invite, merged in #523 after this branch was cut) still wrote budget_usd_per_month and passed it to AgentRead — dropped both so the route keeps working with the field gone. Gates green: backend ruff/ty + principals/engines tests, CLI ruff/format/ty + 296 tests, frontend tsc.

@juliarvalenti juliarvalenti reopened this Aug 15, 2026
@juliarvalenti
juliarvalenti merged commit ba98f63 into main Aug 15, 2026
5 checks passed
@juliarvalenti
juliarvalenti deleted the claude/github-issue-525-ex0pk8 branch August 15, 2026 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Drop the per-agent budget system (budget_usd_per_month) — it was cold-spawn enforcement, now inert

2 participants