Repository navigation
Give a new assistant connection a $5 monthly spend cap - #3382
Merged
Merged
Conversation
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
Conflict in docs/reference/connect-an-assistant.md: kept main's export row and this branch's removed-cap wording.
1 task done
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.
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;removeclears the cap and its spend but keeps the row. The memory store and conformance suite are updated.packages/storage-postgres:adoptisINSERT … ON CONFLICT DO NOTHING;removeis anUPDATEto a null cap. No migration:monthly_cap_centsis already nullable for noted connections.apps/api: the spend gate'sdefaultConnectionCapUsdoption, defaulting todefaultAgentConnectionCapUsd = 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.mdandconnect-an-assistant.mdare updated; the catalog row is unchanged.Validation
prettieron changed filespackages/storageagent-connection-caps.test.ts;apps/apiagent-connection-cap-routes.test.ts,agent-grant.test.ts(17 pass),entitlement-gate-routes.test.ts(38 pass)Conflict
Merged
mainafter #3380. Indocs/reference/connect-an-assistant.mdI 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