Running MultiPromptSendingAttack twice with the same user_messages fails:
msgs = [Message.from_prompt(prompt="turn one", role="user"), Message.from_prompt(prompt="turn two", role="user")]
await attack.execute_async(objective="A", user_messages=msgs) # fine
await attack.execute_async(objective="B", user_messages=msgs) # UNIQUE constraint failed: PromptMemoryEntries.id
The same thing happens when AttackExecutor broadcasts user_messages to several objectives: only the first one completes. The attack sends the caller's Message objects as they are, so their piece IDs get reused. PromptSendingAttack avoids this by calling .duplicate() first.
Separately, MultiPromptSendingAttackParameters.from_seed_group_async never sets targeted_harm_categories, so these results have no harm categories and don't show up when you filter by them.
Fix: send current_message.duplicate() and pass the seed group's harm categories through.
Running
MultiPromptSendingAttacktwice with the sameuser_messagesfails:The same thing happens when
AttackExecutorbroadcastsuser_messagesto several objectives: only the first one completes. The attack sends the caller'sMessageobjects as they are, so their piece IDs get reused.PromptSendingAttackavoids this by calling.duplicate()first.Separately,
MultiPromptSendingAttackParameters.from_seed_group_asyncnever setstargeted_harm_categories, so these results have no harm categories and don't show up when you filter by them.Fix: send
current_message.duplicate()and pass the seed group's harm categories through.