Compare commits

...

2 Commits

Author SHA1 Message Date
Peter Steinberger
87116e959c
fix: hide windows restart console flashes (#44842) (thanks @MoerAI) 2026-03-13 21:06:14 +00:00
MoerAI
817e68da6b
fix(windows): add windowsHide to detached spawn calls to suppress console windows (#44693)
The restart helper and taskkill spawn calls were missing windowsHide: true,
causing visible command prompt windows to flash on screen during gateway
restart and process cleanup on Windows.
2026-03-13 21:04:20 +00:00
4 changed files with 6 additions and 0 deletions

View File

@ -18,6 +18,7 @@ Docs: https://docs.openclaw.ai
- Windows/gateway install: bound `schtasks` calls and fall back to the Startup-folder login item when task creation hangs, so native `openclaw gateway install` fails fast instead of wedging forever on broken Scheduled Task setups.
- Windows/gateway auth: stop attaching device identity on local loopback shared-token and password gateway calls, so native Windows agent replies no longer log stale `device signature expired` fallback noise before succeeding.
- Telegram/media downloads: thread the same direct or proxy transport policy into SSRF-guarded file fetches so inbound attachments keep working when Telegram falls back between env-proxy and direct networking. (#44639) Thanks @obviyus.
- Windows/restart UX: hide detached restart-helper and `taskkill` console windows so gateway restart and process cleanup no longer flash visible command prompts. (#44842) Thanks @MoerAI.
- Agents/compaction: compare post-compaction token sanity checks against full-session pre-compaction totals and skip the check when token estimation fails, so sessions with large bootstrap context keep real token counts instead of falling back to unknown. (#28347) thanks @efe-arv.
- Discord/gateway startup: treat plain-text and transient `/gateway/bot` metadata fetch failures as transient startup errors so Discord gateway boot no longer crashes on unhandled rejections. (#44397) Thanks @jalehman.
- Gateway/session reset: preserve `lastAccountId` and `lastThreadId` across gateway session resets so replies keep routing back to the same account and thread after `/reset`. (#44773) Thanks @Lanfei.

View File

@ -287,6 +287,7 @@ describe("restart-helper", () => {
expect(spawn).toHaveBeenCalledWith("/bin/sh", [scriptPath], {
detached: true,
stdio: "ignore",
windowsHide: true,
});
expect(mockChild.unref).toHaveBeenCalled();
});
@ -302,6 +303,7 @@ describe("restart-helper", () => {
expect(spawn).toHaveBeenCalledWith("cmd.exe", ["/d", "/s", "/c", scriptPath], {
detached: true,
stdio: "ignore",
windowsHide: true,
});
expect(mockChild.unref).toHaveBeenCalled();
});
@ -317,6 +319,7 @@ describe("restart-helper", () => {
expect(spawn).toHaveBeenCalledWith("cmd.exe", ["/d", "/s", "/c", `"${scriptPath}"`], {
detached: true,
stdio: "ignore",
windowsHide: true,
});
});
});

View File

@ -169,6 +169,7 @@ export async function runRestartScript(scriptPath: string): Promise<void> {
const child = spawn(file, args, {
detached: true,
stdio: "ignore",
windowsHide: true,
});
child.unref();
}

View File

@ -83,6 +83,7 @@ function runTaskkill(args: string[]): void {
spawn("taskkill", args, {
stdio: "ignore",
detached: true,
windowsHide: true,
});
} catch {
// Ignore taskkill spawn failures