Skip to content

v0.16.7

Choose a tag to compare

@ya-luotao ya-luotao released this 15 May 08:54
· 680 commits to main since this release

Added

  • ClaudeAgentOptions#resume_session_at — forwarded as --resume-session-at <message-uuid> to the CLI. When resuming a session, the conversation is truncated to include only messages up to and including the assistant message with the given UUID, enabling history rewriting / branched continuations from a specific turn. Raises ArgumentError from CommandBuilder if set without resume (matches the CLI's own validation but surfaces it synchronously in the caller's stack).
  • examples/e2b_transport_example.rb — working ~320-line custom transport that runs the Claude Code CLI inside an E2B Firecracker microVM via the e2b gem. Reuses CommandBuilder for argv parity with SubprocessCLITransport and demonstrates the 6-method Transport interface against a remote backend. README's Custom Transport section now includes an interface table, data-flow diagram, code sketch, and production-hardening checklist that link to the example.

Usage

# Resume a session and rewrite history from a specific assistant turn
ClaudeAgentSDK.query(
  prompt: 'Try a different approach',
  options: ClaudeAgentSDK::ClaudeAgentOptions.new(
    resume: '550e8400-e29b-41d4-a716-446655440000',
    resume_session_at: 'assistant-message-uuid-from-history'
  )
) do |message|
  # only messages up to and including the given UUID are loaded as context
end

What's changed

  • #33 Add resume_session_at option to forward --resume-session-at — @ya-luotao

Full Changelog: v0.16.6...v0.16.7


gem install claude-agent-sdk -v 0.16.7