The badge only appears after fetchAgentMailbox resolves, so asserting immediately after the subtabs render raced against the async update. Move the badge check inside waitFor so it polls until populated. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>