session.resume was building conversation history with only role and content, stripping tool_call_id, tool_calls, and tool_name. The API requires tool messages to reference their parent tool_call, so resumed sessions with tool history would fail with HTTP 500. Use get_messages_as_conversation() which already preserves the full message structure including tool metadata and reasoning fields.