`_spawn_hermes_action` spawned every dashboard action with `windows_detach_flags()`, whose CREATE_BREAKAWAY_FROM_JOB is refused with access-denied when the parent job object forbids breakaway (an Electron/Tauri-launched dashboard, some Windows Terminal configs). The PermissionError bubbled to POST /api/gateway/restart as a 500 and gateway-restart.log kept only its started-header — the action was unspawnable with no recorded reason (#139592). The flag helper documents the fallback contract and five sibling spawn sites implement it; this one now retries once without the flag (any non-denial OSError still raises) and records the refusal or the final failure in the action log before closing it.
Tests: a deny-then-succeed Popen double asserts the exact creationflags sequence and the retry line in the log (Windows lane; mirrors test_gui_command.py); an unrelated spawn OSError asserts the reason lands in the log and still raises.