Fix Windows Terminal Login Loop Error (Exit Code 1) - How to Solve Permission Denied in Windows Terminal-Task Scheduler 502 Error: Causes and Fixes

Final checklist
- Confirm that the same symptom is gone after a restart or refresh.
- Keep the smallest working change and undo temporary diagnostic settings.