[DOCS] Outdated UserMessage Class Definition in Python SDK Reference

Resolved 💬 4 comments Opened Jan 21, 2026 by coygeek Closed Feb 27, 2026

Documentation Type

Unclear/confusing documentation

Documentation Location

https://platform.claude.com/docs/en/agent-sdk/python#usermessage

Section/Topic

The UserMessage class definition under the Message Types section in the Python SDK Reference.

Current Documentation

@dataclass
class UserMessage:
    content: str | list[ContentBlock]

What's Wrong or Missing?

The documentation for the UserMessage class is missing two fields (uuid and parent_tool_use_id) that exist in the actual source code (src/claude_agent_sdk/types.py).

Crucially, the uuid field is required to use the rewind_files() feature, which is documented elsewhere in the SDK guide. Without knowing that UserMessage objects contain a uuid, developers cannot correctly implement file checkpointing and rewinding.

Suggested Improvement

Update the class definition to match the source code:

@dataclass
class UserMessage:
    content: str | list[ContentBlock]
    uuid: str | None = None
    parent_tool_use_id: str | None = None

Impact

High - Prevents users from using a feature

Additional Context

  • Source Code: src/claude_agent_sdk/types.py
  • Related Feature: ClaudeSDKClient.rewind_files(user_message_uuid: str) requires the UUID from a UserMessage.
  • Changelog: Use of uuid was highlighted in the SDK changelog (v0.1.17) but not reflected in the API reference docs.

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗