Claude Code v2.1.245: A Linux Startup Crash Fix and Prompt-Cache TTL Controls#
Part of the Claude Code Version Tracker series. | Official Env Vars | Official Changelog
Coming from v2.1.241, a v2.1.245 user on Arch, CachyOS, or Fedora Rawhide can start Claude Code again: a crash on startup on Linux distributions shipping glibc 2.44 is fixed.[1] The larger feature drop in this window landed in v2.1.243, and two of its pieces are now controllable per session. You can pin how long the prompt cache lives, and a stalled request that used to hang silently for ten minutes now fails fast.
Prompt cache, on your terms#
The promptCacheTtl and subagentPromptCacheTtl settings let API-key and cloud-provider users keep a one-hour prompt cache on the main conversation while subagents stay at five minutes.[1] The binary resolves the TTL in a fixed order: FORCE_PROMPT_CACHING_5M, then the CLAUDE_CODE_PROMPT_CACHE_TTL environment variable, then the setting, then ENABLE_PROMPT_CACHING_1H. So the environment variable overrides the setting, and both accept "5m" or "1h". Left unset, the TTL is automatic: one hour on a Claude subscription within its usage limits, five minutes on an API key, Bedrock, Vertex, or Foundry. One-hour cache writes are billed at a higher rate but stay warm across longer breaks between turns.
A stalled API request no longer hangs the session#
Sessions could go silent for ten-plus minutes when the Anthropic API accepted a request but never started a response.[1] The request now times out at the first byte, retries once, then surfaces API Error: No response from API. The deadline is wired to the tengu_api_no_response_timeout gate and is adjustable through CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS; when unset it derives from the stream idle timeout or one second under API_TIMEOUT_MS.
New Environment Variables#
| Variable | What It Does |
|---|---|
CLAUDE_CODE_PROMPT_CACHE_TTL | Sets the prompt cache TTL for the main conversation (interactive, -p, and SDK turns) to "5m" or "1h". Takes precedence over the promptCacheTtl setting. Unset falls back to automatic selection based on account type. |
CLAUDE_CODE_SUBAGENT_PROMPT_CACHE_TTL | Same control for everything outside the main conversation: subagents, workflows, background and helper requests. Defaults to five minutes unless ENABLE_PROMPT_CACHING_1H is set, and overrides the subagentPromptCacheTtl setting. |
CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS | Overrides the first-byte deadline for a dispatched API request. When the server sends no response headers within it, the request is treated as stalled, retried once, and then reported as an error instead of hanging. |
CLAUDE_CODE_FEDERATION_CACHE_DIR | Points at the directory holding the exchanged workload-identity-federation credential (default <config>/credentials/federation). CI processes in one job read the shared token from here instead of re-exchanging a single-use token. |
The rest of the window#
The v2.1.243 changelog names a wide fix and polish pass alongside those knobs.[1] /usage gained a Loops breakdown (per-loop run count, total tokens, tokens per run, last run), so a runaway /loop is easy to spot. A modelPicker setting curates the /model list with an ordered, labeled set of model ids, including Vertex and Bedrock spellings. A keyless sign-in under /login lets organizations that block API keys authenticate against the Anthropic Console. Native builds load code on demand rather than keeping the whole bundle resident, cutting roughly 40 to 70 MB of memory per session, and the Linux install is zstd-compressed to about 75 MB instead of 340 MB.
What these tell us#
The two per-session knobs both hand back control over behavior that was previously automatic. Prompt-cache TTL was inferred from account type; now an environment variable sits above the setting in the resolution chain, so a script or CI job can force one hour or five minutes regardless of the account default. The first-byte timeout replaces an open-ended wait with a bounded one plus a single retry, and exposes the bound as a variable.
The federation cache directory reads as infrastructure for CI: a fixed on-disk location where the first process in a job writes the exchanged token and the rest read it, which is exactly the sharing the changelog describes. Taken together, the release is weighted toward reliability under automation, with the glibc fix restoring startup for a slice of Linux users who were locked out entirely.
This analysis is conducted for educational and research purposes under fair use principles. All trademarks and software referenced belong to their respective owners. This content is not intended to infringe on any intellectual property rights, circumvent any protections, or encourage unauthorized access to proprietary systems.
Sources#
- Claude Code Official Changelog, v2.1.243 and v2.1.245 release notes
- Official Claude Code Environment Variables
Related Versions#
- Claude Code v2.1.221: Sandbox Credential Masking, a Bash Permission-Bypass Fix, and Silent Artifact Comment Threads. Masked credentials, MCP protocol negotiation, artifact comment threads.
- Claude Code v2.1.219: Opus 5 Becomes the Default Opus Model. New flagship, native 1M context, per-machine dispatch switch.
- Claude Code v2.1.218: Quieter Reviews, a Guard on Team Memory, and Two Knobs the Notes Skip. Review noise controls, memory write guard.
- Claude Code v2.1.217: Subagent Concurrency and Nesting Caps. Deeper agent trees, concurrency limits.