Skip to content

Give a new assistant connection a $5 monthly spend cap - #3382

Merged
akoita merged 2 commits into
mainfrom
claude/project-thread-13joj6-default-cap
Dec 3, 2026
Merged

akoita merged 2 commits into
mainfrom
claude/project-thread-13joj6-default-cap

Conversation

@akoita

@akoita akoita commented Dec 3, 2026 •

Copy link
Copy Markdown
Owner

Requested by booba · project thread

Summary

Closes #3381. A new assistant connection can now start drafts and runs straight away. The first time it asks to spend in a workspace, the spend gate gives the connection a $5 monthly cap (adopt) and reserves again. The person still changes or removes the cap in Settings > Agents. Removing it now keeps the connection's row without a cap, so the connection starts nothing and never gets the default again.

Change checklist lines that applied: storage contract change with conformance tests for both stores, docs in the same PR, focused tests.

Package and architecture impact

  • packages/storage: AgentConnectionCapStore.adopt; remove clears the cap and its spend but keeps the row. The memory store and conformance suite are updated.
  • packages/storage-postgres: adopt is INSERT … ON CONFLICT DO NOTHING; remove is an UPDATE to a null cap. No migration: monthly_cap_cents is already nullable for noted connections.
  • apps/api: the spend gate's defaultConnectionCapUsd option, defaulting to defaultAgentConnectionCapUsd = 5.

Privacy and external effects

No data change. Spending stays bounded per connection, and each run is still checked against the plan and credits.

Feature catalog

Behaviour change inside an existing capability. docs/reference/agent-channel.md and connect-an-assistant.md are updated; the catalog row is unchanged.

Validation

  • prettier on changed files
  • packages/storage agent-connection-caps.test.ts; apps/api agent-connection-cap-routes.test.ts, agent-grant.test.ts (17 pass), entitlement-gate-routes.test.ts (38 pass)
  • Postgres conformance, full typecheck, test and validate: on the PR's CI

Conflict

Merged main after #3380. In docs/reference/connect-an-assistant.md I kept main's "It needs an export to read your CV" row and this branch's "(you removed it)" wording on the spend cap row.

https://claude.ai/code/session_01B4tJPLaUGMSy2ofhVD6utC


Generated by Claude Code

The first time a connection asks to spend, the gate adopts a $5 cap for it and reserves again.
Removing a cap now keeps the connection's row without one, so it starts nothing and is never
given the default again.

Closes #3381

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B4tJPLaUGMSy2ofhVD6utC
@akoita akoita self-assigned this Dec 3, 2026
Conflict in docs/reference/connect-an-assistant.md: kept main's export row and this branch's
removed-cap wording.
@akoita
akoita merged commit b20735a into main Dec 3, 2026
20 of 22 checks passed
@akoita
akoita deleted the claude/project-thread-13joj6-default-cap branch December 3, 2026 02:07
@akoita akoita mentioned this pull request Dec 3, 2026
1 task done
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.

Give a new assistant connection a $5 monthly spend cap by default

2 participants