Answer: On each `/v1/messages` request, the gateway looks up the developer's caps and period-to-date spend in one Postgres query, and a developer over any cap gets a `429` with `error.type: billing_error` and header `x-should-retry: false`. The message gives the UTC date that cap resets (for caps above "0"), and the response also carries a `retry-after` header with the seconds until that cap's period ends. Status: Confirmed Entry: tool/claude-code/pricing-and-limits/spend-limit-enforcement Revision: 1 Digest: sha256:fa3e567a361ec437 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:03:31Z Last changed: 2026-11-13T03:03:31Z Last verified: 2026-11-20T12:18:45Z Next check: 2026-11-21T12:18:45Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of enforcement mechanism | the gateway looks up the developer's caps and period-to-date spend in one Postgres query | [1] | 2026-11-20 over-cap response | 429 | [1] | 2026-11-20 error type | billing_error | [1] | 2026-11-20 retry header | x-should-retry: false | [1] | 2026-11-20 retry-after header | retry-after | [1] | 2026-11-20 reset boundaries | daily at 00:00 UTC, weekly on Monday, and monthly on the first | [1] | 2026-11-20 pre-check timeout | two-second timeout | [1] | 2026-11-20 Sources: [1] Anthropic. "Claude apps gateway spend limits". https://code.claude.com/docs/en/claude-apps-gateway-spend-limits.md Role: primary. Accessed: 2026-11-20T12:18:45Z Quote: "the gateway looks up the developer's caps and period-to-date spend in one Postgres query" (Supports: enforcement mechanism) Quote: "A developer over any cap gets a `429` with `error.type: billing_error` and header `x-should-retry: false`." (Supports: over-cap response, error type, retry header) Quote: "The response also carries a `retry-after` header with the seconds until that cap's period ends." (Supports: retry-after header) Quote: "Caps reset on UTC calendar boundaries: daily at 00:00 UTC, weekly on Monday, and monthly on the first." (Supports: reset boundaries) Quote: "The pre-check queries Postgres with a two-second timeout." (Supports: pre-check timeout) Published: 2026-11-20T03:10:57Z Snapshot SHA-256: 0cd60cadc3fda9d8f2882dbeb78616eb5e17597f4a26a75d0e184044a1eeb165 (captured 2026-11-13T03:03:30Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-13T03:03:31Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T12:18:45Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:18:45Z Last attempt: 2026-11-20T12:18:45Z Notes and limitations: Extracted automatically from a single official source (section "How enforcement works"). Related: https://latestn.com/tool/claude-code/pricing-and-limits/tool-search-limits What are the limits of tool search in Claude Code? https://latestn.com/tool/claude-code/pricing-and-limits/total-cost-of-query How do I get the total cost of a query in the Claude Agent SDK? https://latestn.com/tool/claude-code/pricing-and-limits/ultrareview-diff-limits What are the diff size limits for Claude Code ultrareview and what happens if my diff is too large? https://latestn.com/tool/claude-code/pricing-and-limits/request-pricing-long-prompts How are requests priced against Claude apps gateway spend limits, including long-prompt rates? https://latestn.com/tool/claude-code/pricing-and-limits/review-skipped-budget-message Why did Claude Code Review skip my pull request with a budget message? https://latestn.com/tool/claude-code/pricing-and-limits/scheduled-task-limits What are the usage limits for Claude Code scheduled tasks? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:03:31Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/claude-code/pricing-and-limits/spend-limit-enforcement/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/claude-code/pricing-and-limits/spend-limit-enforcement POST: https://latestn.com/dispute/tool/claude-code/pricing-and-limits/spend-limit-enforcement with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/claude-code/pricing-and-limits/spend-limit-enforcement?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How does the Claude apps gateway enforce spend limits and what happens when a developer hits their cap? Revision 1, last verified 2026-11-20T12:18:45Z. https://latestn.com/tool/claude-code/pricing-and-limits/spend-limit-enforcement (accessed 2026-11-21T10:01:39Z). @misc{LatestN_tool_claude_code_pricing_and_limits_spend_limit_enforcement_r1, title = {How does the Claude apps gateway enforce spend limits and what happens when a developer hits their cap?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/claude-code/pricing-and-limits/spend-limit-enforcement}}, note = {Revision 1; digest sha256:fa3e567a361ec437; last verified 2026-11-20T12:18:45Z; accessed 2026-11-21T10:01:39Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/claude-code/pricing-and-limits/spend-limit-enforcement