Answer: Each session runs in its own subprocess, so concurrency on a host is bounded by how many subprocesses its RAM can hold; size each host with the formula agents per host = (host RAM - overhead) / (per-session RAM ceiling). For long-running sessions, run a pool of containers behind a load balancer and pin each session to one container using consistent hashing on sessionId. Status: Confirmed Entry: tool/claude-code/agents-and-automation/scale-concurrency-hosting Revision: 1 Digest: sha256:613305269b218541 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:02:45Z Last changed: 2026-11-13T03:02:45Z Last verified: 2026-11-20T12:16:42Z Next check: 2026-11-21T12:16:42Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of sizing formula | agents per host = (host RAM - overhead) / (per-session RAM ceiling) | [1] | 2026-11-20 concurrency bound | Each session runs in its own subprocess | [1] | 2026-11-20 starting point | 1 GiB | [1] | 2026-11-20 routing method | consistent hashing on `sessionId` | [1] | 2026-11-20 Sources: [1] Anthropic. "Hosting the Agent SDK". https://code.claude.com/docs/en/agent-sdk/hosting.md Role: primary. Accessed: 2026-11-20T12:16:42Z Quote: "agents per host = (host RAM - overhead) / (per-session RAM ceiling)" (Supports: sizing formula) Quote: "Each session runs in its own subprocess, so concurrency on a host is bounded by how many subprocesses its RAM can hold." (Supports: concurrency bound) Quote: "The 1 GiB starting point in [Resources](#resources) is a floor, not the ceiling." (Supports: starting point) Quote: "pin each session to one container using consistent hashing on `sessionId`" (Supports: routing method) Published: 2026-11-20T02:56:31Z Snapshot SHA-256: 4a2e1e5cdc750b9c5e12273bcb5bf181e6ce36f5aaa930e61455e52b50b36153 (captured 2026-11-20T12:16:40Z) 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]. Cross-check: not-available at 2026-11-20T12:16:42Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:16:42Z Last attempt: 2026-11-20T12:16:42Z Notes and limitations: Extracted automatically from a single official source (section "Scaling and concurrency"). Related: https://latestn.com/tool/claude-code/agents-and-automation/schedule-options What schedule options (frequency and timing) can I set for a scheduled task in Claude Code Desktop? https://latestn.com/tool/claude-code/agents-and-automation/sdk-input-modes What input modes does the Claude Agent SDK support for interacting with agents? https://latestn.com/tool/claude-code/agents-and-automation/send-follow-up-message-running-session How do I send a follow-up message to a running Claude Code session in a self-hosted environment? https://latestn.com/tool/claude-code/agents-and-automation/run-non-interactively How do I run Claude Code non-interactively from the command line? https://latestn.com/tool/claude-code/agents-and-automation/run-plugin-evals-in-ci How do I run Claude Code plugin evals in CI and gate on the score? https://latestn.com/tool/claude-code/agents-and-automation/run-prompt-fixed-interval How do I run a prompt repeatedly on a fixed interval in Claude Code? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:02:45Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/claude-code/agents-and-automation/scale-concurrency-hosting/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/agents-and-automation/scale-concurrency-hosting POST: https://latestn.com/dispute/tool/claude-code/agents-and-automation/scale-concurrency-hosting with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/claude-code/agents-and-automation/scale-concurrency-hosting?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I scale and handle concurrency when hosting the Claude Code Agent SDK? Revision 1, last verified 2026-11-20T12:16:42Z. https://latestn.com/tool/claude-code/agents-and-automation/scale-concurrency-hosting (accessed 2026-11-21T10:03:16Z). @misc{LatestN_tool_claude_code_agents_and_automation_scale_concurrency_hosting_r1, title = {How do I scale and handle concurrency when hosting the Claude Code Agent SDK?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/claude-code/agents-and-automation/scale-concurrency-hosting}}, note = {Revision 1; digest sha256:613305269b218541; last verified 2026-11-20T12:16:42Z; accessed 2026-11-21T10:03:16Z} } 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/agents-and-automation/scale-concurrency-hosting