On a pre-2026-07-28 Agent schema, sessions has no last_activity_at, so the fingerprint index's CREATE failed inside the single BEGIN IMMEDIATE and rolled back idx_messages_session too, leaving messages unindexed: the exact older-agent case the troubleshooting doc says the tool fixes. Gate each index on its columns being present and report 'skipped'. (Opus advisor SHOULD-FIX on #7445.)