What it considers
- Screenshots before and after each step to spot overlays, misalignment, or unexpected UI changes
- Page state and URL at the moment of failure
- Step descriptions and actions to understand intent
- Element targeting details to catch hidden or disabled elements
- Error message and stack
Where you see it
The run viewer surfaces failure analysis under the AI failure analysis tab:- Error summary
- Root cause analysis + suggested fix
- Error details (message, stack)
- Summary of previous steps

Configuration
Setai.aiFailureAnalysis
in momentic.config.yaml:
momentic.config.yaml