If generated unit tests fail due to syntax errors, Agent Mode identifies the cause, fixes it, and re-runs tests until they pass.