Skip to content

v0.14.1

Choose a tag to compare

@ya-luotao ya-luotao released this 09 Apr 10:15
· 727 commits to main since this release
df99723

Fixed

  • Thinking configuration: Use --thinking adaptive / --thinking disabled CLI flags instead of incorrectly mapping to --max-thinking-tokens. Previously, ThinkingConfigAdaptive was mapped to --max-thinking-tokens 32000 (fixed budget) and ThinkingConfigDisabled to --max-thinking-tokens 0, putting the CLI into the wrong mode. Only ThinkingConfigEnabled now uses --max-thinking-tokens. (Parity with Python SDK #796)

Added

  • exclude_dynamic_sections on SystemPromptPreset: When set to true, the CLI strips per-user dynamic sections (working directory, auto-memory, git status) from the preset system prompt and re-injects them into the first user message. This makes the system prompt byte-identical across users, enabling cross-user prompt-caching hits. Sent via excludeDynamicSections in the initialize control message; older CLIs silently ignore it. (Parity with Python SDK #797)

Usage

# Cross-user prompt caching
options = ClaudeAgentSDK::ClaudeAgentOptions.new(
  system_prompt: ClaudeAgentSDK::SystemPromptPreset.new(
    preset: 'claude_code',
    append: '...your shared domain instructions...',
    exclude_dynamic_sections: true
  )
)

gem install claude-agent-sdk -v 0.14.1