Sweep 19 Sep 2026 · 02:36Z Build v2.1.278 500 read Stable v2.1.267 Latest v2.1.278 Next v2.1.278 Feeds RSS JSON llms.txt Unofficial
Claude Code v2.1.274 ·

Gateway server gains a graceful drain/shutdown path

Local managed-gateway server gains a graceful drain step before shutdown

TierUnder the hoodhow much it should matter to you
Useful1my rating, 1 to 5
Signal1worth watching, 1 to 5
AreaGatewaywhat it touches
KindImprovementsin v2.1.274,
Under the hood

Local managed-gateway server gains a graceful drain step before shutdown

**What

The local gateway server that Claude Code runs to manage API requests now tracks how many requests are still in flight and adds a drain method (alongside the existing stop) that stops accepting new work, waits for pending requests up to a timeout, flushes billing/metering data, and reports how many requests were still pending when it finished. The server also now checks whether a request originated from an internal/in-VPC address for logging purposes, and its housekeeping reports now include an outboundLimit value.

Separately, the server-side billing and spend-limit code now tracks in-flight spend-check and metering work and exposes a flush function that waits for all of it to finish before the process exits, using a timeout-bound abort mechanism for the spend-check request itself.

**Why

This reduces the chance of losing in-flight requests or billing/metering data when the gateway shuts down, ensuring usage is accurately recorded rather than dropped mid-request.

See this entry in the whole of v2.1.274 →