Without it, a stale $LASTEXITCODE left over from an earlier native command in the same PowerShell session could cause a CI step to be reported as failed even though the script itself completed successfully. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>