Skip to content

Conversation

@danielsiwiec
Copy link
Contributor

No description provided.

@ashwin-ant
Copy link
Collaborator

Can you clarify why this is needed? This doesn't seem like it needs explicit SDK support.

@danielsiwiec
Copy link
Contributor Author

danielsiwiec commented Oct 16, 2025

@ashwin-ant the parse_message function provides convenient access to claude's internal data model stored in the JSONL files, by parsing them into the Message types (UserMessage, AssistantMessage, etc). I think it's helpful for these types to expose all fields stored in the JSONL messages, like the timestamp or the parent_tool_use_id merged recently.

Two use cases that come to mind:

  • asynchronous, event-driven consumption of the Message types - if the application consumes the Messages from a queue, the time of consumption can be quite different from the time of the message 'production'
  • restoring agent state at a later time, from JSONL files, using parse_message - if messages are restored at a later point, not having the timestamp exposed makes it impossibe to determine it's timing (without manually reading the JSONL file)

Does this make sense?

I put some short version of this context on the issue, as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants