{"version":"2.1.333","anchor":"spend-limit-gateway-docs-add-detailserror-code","canonical_anchor":"spend-limit-gateway-docs-add-detailserror-code","heading":"Gateway guidance on marking a reached spend limit","tier":"notice","area":"Elsewhere","scope":"org","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.333\/e\/spend-limit-gateway-docs-add-detailserror-code","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.333","markdown":"### Gateway guidance on marking a reached spend limit\n\nBuilt-in gateway guidance now says to send the `spend_limit_reached` error code only when the user's own spending cap is reached\n\n**What**\n\nA gateway is a server an organization can place between Claude Code and the model to control access and spending. The guidance for gateway authors that ships with Claude Code now explains how to mark a reached spending cap:\n\n- Send `\"details\":{\"error_code\":\"spend_limit_reached\"}` only when the user's own cap is reached.\n\n- Leave `details` off when the limit check fails closed because the gateway could not fetch the limit.\n\n- Leave `details` off for a shared group pool limit.\n\n**Why**\n\nThis tells people who build gateways how to signal which kind of cap was hit.\n\n- Area: Elsewhere\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 2\/5\n- Scope: org\n- Heads-up: no"}