Skip to content

v0.19.1

Choose a tag to compare

@ya-luotao ya-luotao released this 03 Jul 10:43
· 598 commits to main since this release

Zero-risk fix batch from the 2026-07-03 full-codebase audit (AUDIT-2026-07-03.md).

Added

  • lib/claude-agent-sdk.rb require shim: Bundler.require now loads the SDK in default Rails/Bundler apps. Previously Bundler tried claude-agent-sdk and claude/agent/sdk, silently swallowed both LoadErrors, and left ClaudeAgentSDK undefined until a confusing NameError at 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 / McpSdkServerConfig objects passed directly in mcp_servers (without .to_h) now serialize to their wire hash instead of a #<...> string — and McpSdkServerConfig instances now actually register their in-process server, so its tools connect.
  • create_tool with 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_session no longer hangs forever on a transcript with a parentUuid cycle among progress entries.
  • fork_session / delete_session no 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 raises Errno::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