Claude Code: Startup Performance & Prompt Cache Optimizations
Claude Code v2.1.42 delivers two under-the-hood optimizations that improve the day-to-day experience for active users. Startup time is reduced by deferring Zod schema construction until schemas are actually needed, rather than eagerly building all validators at launch. Prompt cache hit rates are improved by removing the current date from the system prompt, preventing daily cache invalidation. The release also fixes /resume session titles and adds better image dimension error guidance.
Sources & Mentions
3 external resources covering this update
Faster Startup Through Deferred Schema Construction
Claude Code 2.1.42 addresses a quiet but tangible friction point: startup latency caused by eagerly constructing Zod validation schemas at launch. In previous releases, all schemas were built when the application initialized, regardless of whether they were needed for the current session. The 2.1.42 release defers that construction to the moment each schema is first used, cutting down the work performed during the cold-start path and making the CLI feel noticeably more responsive when invoked.
This change is particularly impactful for users who frequently open new sessions or use Claude Code in scripted and automation contexts where the tool is started and exited repeatedly — in those scenarios, every millisecond saved at startup compounds across the workday.
Improved Prompt Cache Hit Rates
The second optimization targets API cost efficiency. Claude Code's system prompt previously included the current date, which meant the prompt text changed every day, preventing the cached version from being reused across calendar boundaries. By moving the date out of the system prompt, the static content can remain stable and cache-eligible across multiple days, meaningfully improving cache hit rates for users who work with long system prompts or large context windows.
Prompt caching reduces token costs by up to 80% on cache hits and lowers response latency for repeated context. Even a modest improvement in hit rate translates to real savings at scale for heavy users and teams running Claude Code in CI or agentic pipelines.
Bug Fixes
Two additional issues are resolved in this release:
/resumewas displaying interrupt messages as session titles in the session picker, making it difficult to identify sessions by name. This is now corrected so that session titles reflect meaningful conversation context.- Image dimension limit errors now explicitly suggest using
/compactas a workaround, providing clearer guidance rather than a bare error message.