Reconstruct subagent state from historical messages.
This method parses an array of messages (typically from thread history) to identify subagent executions and their results. It's used to restore subagent state after:
The reconstruction process:
Note: Internal subagent messages (their streaming conversation) are not reconstructed since they are not persisted in the main thread state.
reconstructFromMessages(messages: Message<DefaultToolCall>[], options: __type)| Name | Type | Description |
|---|---|---|
messages* | Message<DefaultToolCall>[] | Array of messages from thread history |
options | __type | Optional configuration |