Two bugs: 1. createCustomMessage was returning role: 'user' instead of preserving the hook message structure (role: 'hookMessage', customType, etc.) 2. rebuildChatFromMessages wasn't clearing the container before rebuilding