{"version":"2.1.318","anchor":"new-env-var-claude-code-resume-cache-warm-and-a-resume-cache","canonical_anchor":"new-env-var-claude-code-resume-cache-warm-and-a-resume-cache","heading":"Cache warm-up on resume for remote sessions, with CLAUDE_CODE_RESUME_CACHE_WARM","tier":"use","area":"Prompt Caching","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.318\/e\/new-env-var-claude-code-resume-cache-warm-and-a-resume-cache","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.318","markdown":"### Cache warm-up on resume for remote sessions, with CLAUDE_CODE_RESUME_CACHE_WARM\n\nResumed remote sessions can send a short background query to warm the prompt cache, controlled by CLAUDE_CODE_RESUME_CACHE_WARM or remote config\n\n**Unclear.** What setting `CLAUDE_CODE_RESUME_CACHE_WARM` does, and what happens when it is not set, is not known.\n\n**What**\n\nWhen a remote session resumes, Claude Code can now send a short one-turn background request labelled `resume_cache_warm`. A session is one conversation with Claude, and resuming means picking it up again later. The request fills the prompt cache before your first message. The prompt cache is a store on the server that saves reprocessing the conversation each turn.\n\n- It runs only when `CLAUDE_CODE_REMOTE` is set.\n\n- The environment variable `CLAUDE_CODE_RESUME_CACHE_WARM` forces it on (`true`) or off (`false`). An environment variable is a setting passed to Claude Code from your shell.\n\n- Otherwise it follows the remote setting `tengu_resume_cache_warm_config`. The fallback values in the code are `enabled: false`, a delay of 2000 milliseconds, at least 10,000 tokens of context, and only the `remote_cowork` entry point. Nothing has been read about what this setting holds.\n\n- It is skipped for many reasons, for example if your own message gets there first, a command is queued, a budget cap applies, or the thinking-budget setup is not safe for it.\n\n- The request is allowed through a check that normally stops bare forked requests early.\n\n- Resume also times a read-ahead of the transcript, counted in the transcript scan time.\n\n**Why**\n\nThe first reply after resuming a remote or cowork session can come back sooner. The warm-up spends tokens on a background request, so `CLAUDE_CODE_RESUME_CACHE_WARM=false` is how to turn it off.\n\n- Area: Prompt Caching\n- Names: `CLAUDE_CODE_RESUME_CACHE_WARM`\n- Tier: Use it now\n- Useful: 5\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: no"}