Skip to content

v0.33.0 | CC 2.1.76

Choose a tag to compare

@guess guess released this 15 Mar 06:08
· 45 commits to main since this release

Added

  • MCP backend abstraction — New ClaudeCode.MCP.Backend behaviour allows pluggable MCP library backends. Ships with Backend.Anubis (new default) and Backend.Hermes (legacy). Both backends are optional — only compile when their respective library is loaded. Centralized backend detection via ClaudeCode.MCP.backend_for/1. ([4c69cbb])
  • Enhanced session history (Python SDK parity) — New ClaudeCode.History.list_sessions/1 returns rich ClaudeCode.History.SessionInfo metadata (summary, custom title, first prompt, git branch, cwd) using fast head/tail reads without full JSONL parsing. Supports worktree-aware scanning, deduplication, and :limit. ([bf93d7c])
  • Chain-built message retrieval — New ClaudeCode.History.get_messages/2 and ClaudeCode.Session.get_messages/2 reconstruct conversations via parentUuid chain walking, correctly handling branched and compacted conversations. Returns ClaudeCode.History.SessionMessage structs with parsed content blocks (TextBlock, ToolUseBlock, etc.). Supports :limit and :offset pagination. ([bf93d7c])
  • ClaudeCode.History.SessionMessage struct — Typed struct for history messages with :user/:assistant atom types, chain metadata (uuid, session_id), and parsed message content. ([bf93d7c])
  • ClaudeCode.History.SessionInfo struct — Rich session metadata including session_id, summary, last_modified, file_size, custom_title, first_prompt, git_branch, and cwd. ([bf93d7c])
  • ClaudeCode.History.sanitize_path/1 — Python SDK-compatible path sanitization (replaces all non-alphanumeric chars with hyphens, handles long paths with hash suffix). ([bf93d7c])
  • Configurable control_timeout session option — Max time in ms to wait for CLI control responses (e.g. initialize handshake, MCP server startup). Defaults to 60,000ms to match the Python SDK. Useful when MCP servers are slow to start. ([fb28a46], [6758caa])

Changed

  • MCP tool macro rewrite — ClaudeCode.MCP.Server.tool/3 now generates standalone modules without Hermes dependency. Tools use execute/2 with (params, assigns) instead of Hermes frames. ([4c69cbb])
  • MCP Router decoupled from Hermes — Router delegates all tool operations to the configured backend instead of importing Hermes modules directly. ([4c69cbb])
  • Breaking: Removed ClaudeCode.History.conversation/2, ClaudeCode.History.conversation_from_file/1, and ClaudeCode.Session.conversation/2 — replaced by get_messages/2 which properly handles branched/compacted conversations via parentUuid chain building. ([bf93d7c])
  • Breaking: Removed :callback_timeout from ClaudeCode.Adapter.Node — proxy delegation for hooks and MCP now uses the unified :control_timeout option instead. If you were passing :callback_timeout in adapter config, change it to :control_timeout as a session option. ([6758caa])