claude gateway now shuts down gracefully on SIGTERM/SIGINT instead of exiting abruptly
The claude gateway command now installs signal handlers for SIGTERM and SIGINT (the standard shutdown and interrupt signals). On receiving one, it stops accepting new connections and drains any in-flight requests, waiting up to CLAUDE_GATEWAY_DRAIN_TIMEOUT_MS (default 25000ms) plus a 3-second grace buffer before exiting. If a second signal arrives while shutting down, the gateway force-closes and exits immediately.
This lets requests already in progress finish cleanly when the gateway is stopped or restarted, instead of being cut off mid-flight, while still allowing an impatient operator to force an immediate exit.
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
* **The drain window**: set the `CLAUDE_GATEWAY_DRAIN_TIMEOUT_MS` environment variable on the gateway container to a positive whole number of milliseconds, such as `120000`. The gateway ignores a value in any other form, such as `120s`, an…claude-apps-gateway-deploy see the edit
Anthropic's documentation has since written up CLAUDE_GATEWAY_DRAIN_TIMEOUT_MS, on Claude apps gateway deployment and operations.
Fixed Claude apps gateway cutting every open stream on SIGTERM: it now lets in-flight requests finish for up to 25 seconds before exiting…
New in this build: CLAUDE_GATEWAY_DRAIN_TIMEOUT_MS