@@ -501,7 +501,8 @@ func (m *messageListCmp) convertAssistantMessage(msg message.Message, toolResult
501501 // If this tool call is the agent tool, fetch nested tool calls
502502 if tc.Name == agent.AgentToolName {
503503 nestedMessages, _ := m.app.Messages.List(context.Background(), tc.ID)
504− nestedUIMessages := m.convertMessagesToUI(nestedMessages, make(map[string]message.ToolResult))
504+ nestedToolResultMap := m.buildToolResultMap(nestedMessages)
505+ nestedUIMessages := m.convertMessagesToUI(nestedMessages, nestedToolResultMap)
505506 nestedToolCalls := make([]messages.ToolCallCmp, 0, len(nestedUIMessages))
506507 for _, nestedMsg := range nestedUIMessages {
507508 if toolCall, ok := nestedMsg.(messages.ToolCallCmp); ok {