Fixed
- Keep agent diagnostic and repair commands visible until explicitly closed, including during background refresh failures.
- Generate the Windows diagnostic command as one physical PowerShell line.
- Separate Windows service process state from agent heartbeat health.
- Print the stale/repair verdict and required action after service history.
- Validate the generated diagnostic command with Windows PowerShell in CI.