ThreadsClient.get_history not returning subgraph checkpoints

How can I get full checkpoint history of a thread including subgraph checkpoints? The use case is I want to rebuild the history with checkpoint info on app startup to allow users to time travel to any previous checkpoint.

hi @sasharosca

have you tried subgraphs = await client.assistants.get_subgraphs(assistant_id, recurse=True) ?

# Discover namespaces (declared in the assistant)
subgraphs = await client.assistants.get_subgraphs(assistant_id, recurse=True)

# subgraphs is a mapping of namespace -> GraphSchema
for ns in subgraphs.keys():
    if not ns:  # skip root
        continue
    sub_history = await client.threads.get_history(
        thread_id=thread_id,
        checkpoint={
            "thread_id": thread_id,
            "checkpoint_ns": ns,
            "checkpoint_id": None,       # start from subgraph root
            "checkpoint_map": None,      # optional
        },
        limit=100,
    )
    # ...collect per-namespace history and merge on created_at / parent_checkpoint