Answer: Run each runner at `--capacity 1` under its own memory limit set to one session's memory: in a container, run one runner per container and set the container's memory limit (such as `limits.memory` on Kubernetes, `--memory` on Docker, or `mem_limit` in a Compose file); under systemd without a container, set `MemoryMax` on the runner's unit and run one runner per host. Status: Confirmed Entry: tool/claude-code/admin-and-enterprise/set-session-memory-limit Revision: 2 Digest: sha256:20ff85d7b4b3e8b1 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:05:39Z Last changed: 2026-11-18T12:19:57Z (capacity setting: — → --capacity 1) Last verified: 2026-11-20T12:24:54Z Next check: 2026-11-21T12:24:54Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of capacity setting | --capacity 1 | [1] | 2026-11-20 Kubernetes memory limit | limits.memory | [1] | 2026-11-20 Docker memory limit | --memory | [1] | 2026-11-20 Compose memory limit | mem_limit | [1] | 2026-11-20 systemd memory limit | MemoryMax | [1] | 2026-11-20 Sources: [1] Anthropic. "Deploy self-hosted environments to production". https://code.claude.com/docs/en/self-hosted-environments-deploy.md Role: primary. Accessed: 2026-11-20T12:24:54Z Quote: "run each runner at `--capacity 1` under its own memory limit" (Supports: capacity setting) Quote: "such as `limits.memory` on Kubernetes" (Supports: Kubernetes memory limit) Quote: "`--memory` on Docker" (Supports: Docker memory limit) Quote: "`mem_limit` in a Compose file" (Supports: Compose memory limit) Quote: "set `MemoryMax` on the runner's unit" (Supports: systemd memory limit) Published: 2026-11-20T03:48:50Z Snapshot SHA-256: e3fbe3f6840c260e4c0a51b93050a75e498c052fda2653b5a9ca7a45ebfa987c (captured 2026-11-20T12:24:53Z) 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:24:54Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:24:54Z Last attempt: 2026-11-20T12:24:54Z Notes and limitations: Extracted automatically from a single official source (section "Give each session its own memory limit"). Related: https://latestn.com/tool/claude-code/admin-and-enterprise/set-spend-cap-admin-api How do I set a spend limit for a developer through the Claude apps gateway Admin API? https://latestn.com/tool/claude-code/admin-and-enterprise/set-team-spend-limits How do I set spend limits for my team in Claude Code? https://latestn.com/tool/claude-code/admin-and-enterprise/set-up-claude-tag-for-team How do I set up Claude Tag for my whole team as an administrator? https://latestn.com/tool/claude-code/admin-and-enterprise/session-token-claims-reference What claims does the Claude Code session access token contain and what does each claim mean? https://latestn.com/tool/claude-code/admin-and-enterprise/session-token-proves-and-format What does the Claude Code session token prove and what is its format? https://latestn.com/tool/claude-code/admin-and-enterprise/set-gateway-url-user-settings How do I set the gateway URL for Claude Code in user settings? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-18T12:19:57Z | changed | capacity setting: — → --capacity 1 | [1] 2026-11-18T12:19:57Z | changed | capacity: --capacity 1 → — | [1] 2026-11-13T03:05:39Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/claude-code/admin-and-enterprise/set-session-memory-limit/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/admin-and-enterprise/set-session-memory-limit POST: https://latestn.com/dispute/tool/claude-code/admin-and-enterprise/set-session-memory-limit with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/claude-code/admin-and-enterprise/set-session-memory-limit?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I set a memory limit for each session on a Claude Code self-hosted runner? Revision 2, last verified 2026-11-20T12:24:54Z. https://latestn.com/tool/claude-code/admin-and-enterprise/set-session-memory-limit (accessed 2026-11-21T10:00:03Z). @misc{LatestN_tool_claude_code_admin_and_enterprise_set_session_memory_limit_r2, title = {How do I set a memory limit for each session on a Claude Code self-hosted runner?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/claude-code/admin-and-enterprise/set-session-memory-limit}}, note = {Revision 2; digest sha256:20ff85d7b4b3e8b1; last verified 2026-11-20T12:24:54Z; accessed 2026-11-21T10:00:03Z} } 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/admin-and-enterprise/set-session-memory-limit