Repository navigation
v0.19.1
Zero-risk fix batch from the 2026-07-03 full-codebase audit (AUDIT-2026-07-03.md).
Added
lib/claude-agent-sdk.rbrequire shim:Bundler.requirenow loads the SDK in default Rails/Bundler apps. Previously Bundler triedclaude-agent-sdkandclaude/agent/sdk, silently swallowed both LoadErrors, and leftClaudeAgentSDKundefined until a confusingNameErrorat first use.
Fixed
require 'claude_agent_sdk/instrumentation'now loads the SDK core, so the documented Rails observability initializer works as the only require.- Typed
McpStdioServerConfig/McpSSEServerConfig/McpHttpServerConfig/McpSdkServerConfigobjects passed directly inmcp_servers(without.to_h) now serialize to their wire hash instead of a#<...>string — andMcpSdkServerConfiginstances now actually register their in-process server, so its tools connect. create_toolwith a Symbol name produced a tool that was advertised but failed every invocation with 'Tool not found'; names are now coerced to String.- One stdout line carrying invalid UTF-8 bytes no longer aborts the whole message stream (which dropped all buffered valid frames, including a trailing
result). fork_sessionno longer hangs forever on a transcript with aparentUuidcycle among progress entries.fork_session/delete_sessionno longer stop at a 0-byte transcript stub — they fall through to the worktree project dir holding the real transcript. A session whose only copy is a 0-byte stub now raisesErrno::ENOENT, consistent with reads.- Long-lived
Clients using SDK MCP servers no longer leak one finished internal task per synchronously-handled control request. - An observer implementing none of the observer interface — most commonly a Class passed instead of an instance (
observers: [OTelObserver]) — is now warned about and skipped instead of producing silent zero instrumentation.
Changed
- The gem packages git-tracked files only (previously a working-tree glob that shipped stray untracked files in locally built gems).
What's changed
- #41 Audit 2026-07-03 Batch A: zero-risk fixes (require shim, guards, coercions) — @ya-luotao
Full Changelog: v0.19.0...v0.19.1
gem install claude-agent-sdk -v 0.19.1