Repository navigation
Description
Summary
When the tray is running (the normal case — it autostarts), shutting down or
restarting Windows frequently pops up a Windows hard-error dialog:
wsl.exe - Application Error
应用程序无法正常启动(0xc0000142)。请单击"确定"关闭应用程序。
This is STATUS_DLL_INIT_FAILED raised via NtRaiseHardError. It happens because
the tray's reconnect timers fire after the session has started tearing down, and
each fire spawns a wsl.exe that can no longer get a conhost. Nothing is actually
broken — the gateway comes back fine on next boot — but the dialog is alarming and
users reasonably read it as "my system is failing".
Environment
| OS | Windows 11 Home (China), build 10.0.26300 |
| App | OpenClaw Companion 2026.9.4.0 — D:\OpenClawTray\OpenClaw.Tray.WinUI.exe |
| Distro | app-owned OpenClawGateway (base Ubuntu-24.04, systemd enabled) |
| Gateway | ws://127.0.0.1:18789, loopback + token auth |
| Data | %APPDATA%\OpenClawTray\settings.json, %LOCALAPPDATA%\OpenClawTray\openclaw-tray.log |
| Tray autostart | yes; starts 2–4 min after boot |
Steps to reproduce
- Start the tray normally and let it reach the steady state (keepalive running,
i.e. a long-livedwsl.exe -d OpenClawGateway -- sleep infinityis present). - Shut down or restart Windows from the Start menu.
Observed on essentially every shutdown where teardown takes long enough for the
timers to fire (~45% of shutdowns on this machine, measured over 47 shutdowns
since install; when it happens it is exactly 2 dialogs, always).
Observed behaviour
The dialogs are recorded verbatim by Windows as Application Popup, System log,
Event ID 26 (Properties[0] = caption, Properties[1] = message):
10-01 12:46:xx [wsl.exe - Application Error] 应用程序无法正常启动(0xc0000142)。请单击"确定"关闭应用程序。
10-01 12:46:xx [wsl.exe - Application Error] 应用程序无法正常启动(0xc0000142)。请单击"确定"关闭应用程序。
10-01 14:31:xx [wsl.exe - Application Error] … (x2, same text)
10-01 16:44:46 [wsl.exe - Application Error] … (x2 — 16:44:46 and 16:44:49)
Correlated with the tray log (%LOCALAPPDATA%\OpenClawTray\openclaw-tray.log,
local time — note the app logs local, not UTC):
16:44:44 User32 1074: shutdown initiated (StartMenuExperienceHost.exe, "restart")
16:44:45 <both WS sockets to the gateway close> "Connection closed prematurely" (x2, 15-35 ms apart)
16:44:45 "node reconnecting in ~1.1s"
16:44:45 "gateway reconnecting in ~1.2s"
16:44:46 timer fires -> wsl.exe spawn <- dialog #1
16:44:47 timer fires -> wsl.exe spawn <- dialog #2
16:44:46+ Winlogon 6000 / 7002, FilterManager 6006, Hyper-V-VmSwitch NIC teardown
Inter-dialog spacing is not fixed (0.09 s / 0.15 s / ~3 s observed across events),
so it is not one code path firing twice on a fixed schedule — it is the two
independent reconnect paths (node + gateway) racing the teardown.
Which spawn is it
The spawn command is wsl.exe -d OpenClawGateway -- bash -s (the repair/probe
form), not the steady-state -- sleep infinity. Note that the tray logs nothing
for this spawn — the log has no Repair/Probe line at all, which is what made
this hard to pin down from the outside. Might be worth logging it.
Ruled out (by testing, not by reading)
EnableManagedLocalGatewayAutoRepair: falsedoes not prevent it. With that
switch set, the 2026-10-01 16:44:44 restart still produced exactly 2 dialogs
(16:44:46 and 16:44:49) — same as with it lefttrue(12:46 → 2, 14:31 → 2).
So the spawn is not (only) the auto-repair coordinator; it is the
reconnect/keepalive path. Setting reverted afterwards.EnableNodeMode: falsewould at best remove 1 of the 2, at a large functional
cost, so it is not a fix.- This is not a WSL/hypervisor defect: the distro itself is fine, and the same
wsl.exeruns happily all day while a session is alive. The problem is purely
"spawn a console app after teardown has begun". - Not a WER dialog:
HKCU\...\Windows Error Reporting\DontShowUIdoes not
suppress it (this is a hard error, not a report).
Root cause, as best I can tell from outside
The 4 tray assemblies contain zero occurrences of SystemEvents,
SessionEnding, QUERYENDSESSION, HasShutdownStarted, or WM_ENDSESSION.
The app has no notion of "the session is ending", so when the gateway connection
drops during shutdown it treats it as an ordinary transient disconnect and re-arms
keepalive / reconnect timers (_reArmKeepAliveAsync, reconnectIfCurrentAsync,
probeReachableAsync, WslGatewayKeepAliveService.TryEnsureAsync) into a session
that is already gone.
Suggested fix
- Before any keepalive/reconnect spawn, bail out if the session is ending. Either:
- check
Environment.HasShutdownStarted, and/or - subscribe once to
Microsoft.Win32.SystemEvents.SessionEndingand set a flag
that gates_reArmKeepAliveAsync/ the reconnect callbacks, and/or - poll
GetSystemMetrics(SM_SHUTTINGDOWN)(works without a message pump).
Any of these would also stop the pointless spawn during logoff, not just
shutdown/restart.
- check
- Log these spawns (command + reason) — their absence from the log is the main
reason this took a full day of external tracing to attribute.
Impact
Cosmetic but loud, and in this case it is the only thing the user sees at
shutdown, so it reads as a system fault. There is no in-app workaround.
The only machine-side suppression I found is
HKLM\SYSTEM\CurrentControlSet\Control\Windows\ErrorMode = 2. I have since
verified it on a restart where the trigger chain definitely fired (same two
Connection closed prematurely lines, same two reconnect timers): the dialogs
are no longer displayed, but Windows still logs the three Application Popup
records, so the underlying spawn still happens and the failure is only hidden —
not fixed, and now hidden machine-wide for every app. That is why this still
needs a fix in the tray.
Diagnostic commands used
# the authoritative record of a desktop popup (caption + message)
Get-WinEvent -FilterHashtable @{LogName='System';Id=26;StartTime=(Get-Date).AddDays(-7)} |
Sort-Object TimeCreated |
ForEach-Object { "{0:MM-dd HH:mm:ss} [{1}] {2}" -f $_.TimeCreated, $_.Properties[0].Value, (($_.Properties[1].Value -replace '\s+',' ')) }
# what initiated the shutdown
Get-WinEvent -FilterHashtable @{LogName='System';Id=1074;StartTime=(Get-Date).AddDays(-7)} |
Sort-Object TimeCreated |
ForEach-Object { "{0:MM-dd HH:mm:ss} {1}" -f $_.TimeCreated, (($_.Properties | ForEach-Object {$_.Value}) -join ' | ') }
# the trigger chain in the tray's own log
Select-String -Path "$env:LOCALAPPDATA\OpenClawTray\openclaw-tray.log" `
-Pattern 'Connection closed prematurely|reconnecting in' -Encoding UTF8Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Projects
- StatusShow more project fieldsBacklog
Activity
clawsweeper commentedon Oct 1, 2026
Codex review: this still needs some work.
Summary
Keep this issue as the evidence umbrella: current main still allows WSL launches without Windows session-end checks, and the reporter’s complementary repair issues remain open.
Reproducibility: Current source establishes unchecked launch paths and discarded keepalive cancellation, supported by the reporter’s corrected traces; no live shutdown reproduction, builds, or tests ran, and WinApp CLI was unavailable.
Root-cause cluster
Relationship:
canonicalCanonical: #1571
Summary: The reporter explicitly retained this evidence umbrella and split the missing lifecycle source and its consumers into complementary repairs.
Members:
partial_overlap: Gate the managed-local provenance probe so it cannot start wsl.exe during Windows session teardown #1572 - Owns refusal at the provenance process-start boundary.partial_overlap: Tray keep-alive can still start during Windows session end and its repair adapter ignores the cancellation token #1573 - Owns keepalive entry checks and cancellation through service preparation.partial_overlap: Reconnect retry loop invokes reconnect authorization with no Windows session-ending check #1574 - Owns reconnect refusal before authorization, including session end during backoff.partial_overlap: Provide one shared Windows session-ending signal and wire it for production use #1575 - Owns the shared lifecycle abstraction, Windows observer, and production wiring.Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.
Next step
Complete the linked lifecycle prerequisite and consumer repairs with failing zero-launch regressions, then verify WSL-filtered shutdown Event 26 records while retaining this issue as their evidence trail.
Review details
Best possible solution:
Use one production-wired Windows lifecycle source to stop reconnect and repair admission and guard process launches while preserving normal recovery and ordered shutdown.
Do we have a high-confidence way to reproduce the issue?
Current source establishes unchecked launch paths and discarded keepalive cancellation, supported by the reporter’s corrected traces; no live shutdown reproduction, builds, or tests ran, and WinApp CLI was unavailable.
Is this the best way to solve the issue?
The shared lifecycle prerequisite and focused consumer repairs fit the defect, provided failing regressions cover zero launches after session-end observation, transitions during backoff and preparation, and unchanged ordinary reconnect behavior.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning medium; reviewed against b762c8dc12a8.
Label changes
Label changes:
No label changes.
Label justifications:
P2: Shutdown error dialogs warrant repair, with no established data loss, blocked first run, or failed recovery on the next boot.impact:ux-friction: Alarming Windows application-error dialogs create avoidable confusion and support burden during shutdown.Evidence reviewed
What I checked:
src/OpenClaw.Tray.WinUI/App.xaml.cs:1183, b762c8dc12a8)src/OpenClaw.Tray.WinUI/Services/WslGatewayKeepAliveService.cs:97, b762c8dc12a8)src/OpenClaw.Shared/WebSocketClientBase.cs:780, b762c8dc12a8)src/OpenClaw.Connection/ManagedLocalGatewayPortProvenanceService.cs:100, b762c8dc12a8)wsl.exeduring session teardown, producing an "Application Error 0xc0000142" popup on every shutdown/restart #1571 (comment) reports 92 WSL Event 26 records in 35 bursts, retracts the fixed dialog count, identifies events outside shutdown, and explains why machine-wide popup suppression is not a fix.How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.Reviewed November 29, 2026, 2:22 AM ET / 07:22 UTC.
petruslin commentedon Oct 1, 2026
Follow-up from the reporter: reproduction data, and a correction to my own report
I filed this, then kept the machine running and collected a longer sample. Two things
came out of it: the evidence the review asked for, and a claim in my original post that
the data does not support. Retracting that first.
1. Retraction: "exactly 2 dialogs, always" is wrong
My original post says the popup count is always exactly two. It isn't. That was drawn
from three consecutive shutdowns on one afternoon, all of which happened to be n=2.
Over a 9-day window the count ranges from 1 to 15:
The two-reconnect-path story (node keep-alive and gateway keep-alive each spawning their
own
wsl.exe) is still the best explanation for why 2 is the mode. It is not anexplanation for a fixed count. See §4.
2. Popup bursts over 9 days (2026-09-22 .. 2026-10-01)
Application Popup/ System / Event ID 26, filtered to records whose joined propertytext contains
wsl.exe. 68 records, grouped into bursts by a >120 s gap:All 23 bursts have a shutdown/restart initiation (Event 1074) within ±120 s — 23/23,
no exceptions. The same window contains 49 boots (Event 6005) and 46 Event 1074
records, so roughly half of teardowns produced a burst. I am deliberately not quoting a
precise rate: a single physical restart can log two 1074s (observed 09-22 20:51:53
StartMenuExperienceHost.exe, then 20:52:01winlogon.exe, reason0x500ff), so thedenominator depends on how you dedupe.
Note the ordering is not reliable: in 19 bursts the 1074 precedes the burst, in 4
(rows 5, 8, 13, 15) it follows it by 11-46 s. I would not build anything on the ordering
inside that 2-minute window.
3. Same record verbatim
4. Why the count varies — and why the trigger chain is necessary but not sufficient
The tray log (
%LOCALAPPDATA%\OpenClawTray\openclaw-tray.log) shows, for every one ofthe four 10-01 shutdowns, both keep-alive paths detecting the drop and re-arming:
Putting that next to the popup counts for the same four shutdowns:
Identical trigger, different outcome. The chain firing is necessary but not
sufficient — it is a race against how far the process teardown has progressed. That is
also why I think a single reboot is not a valid non-reproduction: see §5.
What the count is not driven by
When I filed, I assumed each reconnect attempt spawns its own
wsl.exe, so the dialogcount would follow the number of attempts. The tray log refutes that, and I can show it
rather than guess.
Every connection-drop event in the log's retention window (2026-09-29 15:19 → now)
re-armed with exactly two attempts, both
attempt 1— one on the node path, one onthe gateway path — at 1016-1233 ms. Nothing else, ever:
Constant input, 0-to-3 output. So the count is not a function of the retry structure.
The only multi-attempt sequences anywhere in the window (
attempt 2~2.0-2.4 s,attempt 3~4.9 s) are on 10-01 14:49-14:51 and 17:49 — sessions where the gateway wasgenuinely down for minutes with no shutdown in progress — and those produced zero
popups. More retries, no dialogs; exactly two retries, up to three dialogs. I'd call the
backoff-count idea dead.
Two things I'd still flag, because they're where the answer has to be:
further
wsl.exespawn happens on this path that the tworeconnecting in ...linesdo not represent. The keep-alive service's own ensure/repair path is my candidate: it
only logs
[WslKeepAlive] Started keepalive for OpenClawGateway (PID n).on successat startup, so a failed ensure during teardown would leave no line at all.
the two sustained bursts (rows 4 and 8) has to be a repeated spawner. I cannot count
its attempts:
openclaw-tray.logstarts at 2026-10-01 10:51:01 andopenclaw-tray.log.oldat 2026-09-29 15:19:56, so combined retention is under two days.That is verified by reading both files' first lines, not assumed — rows 4 and 8 are
permanently unverifiable from this machine.
So the two-reconnect-path story explains why 2 is the mode, and why dialogs exist at
all. It does not explain the spread. How many times each path actually calls spawn —
including calls that fail before they can log — is what would settle both bullets at
once, and that needs the source.
5. Reproduction preconditions (the likely answer to "not independently reproduced")
Two things have to be true, and the first is easy to miss:
takes time to establish both connections. On 10-01 I shut down three times within
~2 minutes of logon (17:03:03, 17:07:13, 17:09:39) and got zero popups each time —
nothing had been established yet, so there was nothing to tear down. Leave the session
idle for several minutes before rebooting.
So: reboot-from-Start-menu once, immediately, and you will very likely conclude this is
not reproducible. The precondition above is the difference.
And do not use "I saw no popup" as the success signal.
ErrorMode=2(
HKLM\SYSTEM\CurrentControlSet\Control\Windows) suppresses the display of thesedialogs without stopping the spawn or the Event 26 record. I set it on 10-01 at 16:53:19;
the very next shutdown (16:53:31) still logged 3 Event 26 records while showing nothing
on screen. Event 26 is the ground truth; the dialog being visible is not.
6. What I can and cannot contribute
I can keep collecting Event 26 / tray-log data on this machine, and I can run an
instrumented build and send you the logs. I cannot hand you a failing regression myself:
I don't have a working build environment for the tray here, so I can't compile or run the
test project.
What I would assert in one, if that's useful — the observable contract, stated so it can
fail:
A test for that does not need the real shutdown: a fake/replaceable process-spawner
injected into the keep-alive path, driven with "connection dropped" after a simulated
session-end, should record zero spawns. That test fails on the current build and
passes once the repair is in — which is what the review asked for, and it is the piece
I can't produce without a build.
Command I used to produce §2, if you want to run it on another machine:
Join all properties before matching — the caption is empty on some Event 26
families, and matching on caption alone silently drops them.
Environment: Windows 11 Home China 10.0.26300; OpenClaw Companion 2026.9.4.0
(tray:
%LOCALAPPDATA%\OpenClawTray\).clawsweeper commentedon Oct 1, 2026
🦞🔧
ClawSweeper is automatically building a fix for this issue.
The issue review finished and no active implementation pull request was found.
Automatic implementation progress:
clawsweeper:manual-onlyorclawsweeper:human-review.Result: implementation blocked.
petruslin commentedon Oct 1, 2026
Reporter follow-up: root cause, a correction to my own report, and reproduction preconditions
I filed this, then read the source and kept collecting. The first section is where the
bug actually lives, with line references. Section 2 retracts a claim from my original
post that 16 days of data do not support.
1. Root cause: nothing in the tray knows the session is ending
wsl.exeis the victim here, not the culprit. The popups are the tray spawningwsl.exewhile the session is being torn down.
(a) There is no session-end handling anywhere in the source. Searched all of
src/:Zero hits. Nothing in the tray observes
WM_QUERYENDSESSION,WM_ENDSESSION,SystemEvents.SessionEnding, orEnvironment.HasShutdownStarted. This is the"session-ending guard" the review asked for — it does not exist today, so there is
nothing for the keep-alive/repair paths to consult.
(b) A 5-second poll loop keeps running through teardown.
src/OpenClaw.Tray.WinUI/Services/ManagedLocalGatewayAutoRepairMonitor.cs:The loop's only exit is
_cts.Cancel(), andDisposeAsyncis willing to abandon itafter 3 seconds. So the monitor is free to act during the window that matters here.
(c) Session teardown is exactly what that loop classifies as "repairable".
Same file,
:246-271 IsTransportUnreachablereturns true forConnectingwith noclassified error (
:259-264). When the gateway socket dies because services are stopping,the operator state is precisely "connecting, no error classified" — so the monitor
qualifies the teardown as a transport outage and calls the repair coordinator
(
:208 await _repairAsync(...)). The repair budget is 3 restarts per gateway(
ManagedLocalGatewayRepairCoordinator.cs:142,:161, checked at:381).(d) The repair path spawns
wsl.exethrough a bareProcess.Startthat bypasseslogging.
src/OpenClaw.Tray.WinUI/Services/WslGatewayKeepAliveService.cs:Two things matter here. First, it calls
System.Diagnostics.Process.Startdirectly,not through the instrumented runner — compare
src/OpenClaw.Connection/WslCommandRunner.cs:132, which builds itsProcessStartInfoand then logs
[WSL] {fileName} {args}at:153. Second, the keepalive logs only onsuccess (
:100, insideif (proc is not null)) — so a keepalive spawn that failsduring teardown leaves no trace in the log at all. And per its own comment at
:73-76,this path runs on every auto-repair, not just at startup.
Mechanism, stated plainly:
This is not a WSL bug, and not specific to
wsl.exe. In the same 09-16/09-17 window,0xc0000142 during teardown also hit
whoami.exe,where.exe,powershell.exe,cscript.exe,runas.exe,clip.exe,wscript.exe,openfiles.exe,certutil.exe,tasklist.exe,timeout.exe,choice.exe,msinfo32.exe,dxdiag.exe. Anything thetray (or anything else) tries to launch at that moment fails the same way. The defect is
"spawning during teardown," and
wsl.exeis simply what the tray keeps spawning.2. Correction to my own report: "exactly 2 dialogs, always" is wrong
My original post says the count is always exactly two. It isn't. That came from three
consecutive shutdowns on one afternoon that all happened to be n=2. Over 16 days
(2026-09-16 .. 2026-10-01) the real distribution is 92 records in 35 bursts:
Range 1–15. Do not hardcode 2, and do not write a test that asserts 2. Full table in
Appendix A.
What this does not change: the two-spawn-path story is still the best explanation for
why 2 is the mode, and for why dialogs exist at all. It does not explain the spread.
The count is not the retry count. Every connection-drop event in the tray log's
retention window re-armed with exactly two attempts, both
attempt 1(one node path, onegateway path, 1016–1233 ms):
Constant input, 0-to-3 output. The only multi-attempt sequences anywhere in the window
(
attempt 2~2.0–2.4 s,attempt 3~4.9 s) are on 10-01 14:49–14:51 and 17:49 — sessionswhere the gateway was genuinely down for minutes with no shutdown in progress — and
those produced zero popups. More retries, no dialogs; two retries, up to three
dialogs. The backoff-count idea is dead.
Two things I'd still flag, because they're where the answer has to be, and item (d) in
§1 is my candidate for both:
one further
wsl.exespawn on this path that thereconnecting in ...lines do notrepresent. The keepalive in §1(d) logs only on success, so a failed keepalive spawn is
invisible here.
re-spawning. I cannot count its attempts:
openclaw-tray.logstarts at2026-10-01 10:51:01 and
openclaw-tray.log.oldat 2026-09-29 15:19:56, so combinedretention is under two days. That is read off both files' first lines, not assumed —
the 09-23 and 09-24 bursts are permanently unverifiable from this machine.
And one correction I can't make go away. Of the 35 bursts, 29 have an Event 1074
within ±120 s — not all of them. Five bursts have neither a nearby 1074 nor a following
boot:
Same binary, same error code, but mid-session, not shutdown- or boot-correlated. So
the mechanism is not exclusive to session end — it also fires when the tray spawns
wsl.exewhile the WSL service/distro is unavailable. That is consistent with §1: thetrigger is "spawn attempted while WSL can't come up," and session end is only the most
common way to get there on this machine. (A sixth burst, 09-22 11:02:37, also has no
nearby 1074; it has a boot 285 s later, which is too far to be a shutdown artifact.)
I can't attribute these five to a specific code path, because the tray log that would
show it is gone.
3. Reproduction preconditions — the likely answer to "not independently reproduced"
Two conditions, and the first is easy to miss:
takes time to establish both connections. On 10-01 I shut down three times within
~2 minutes of logon (17:03:03, 17:07:13, 17:09:39) and got zero popups each time —
nothing had been established, so there was nothing to tear down. Leave the session
idle for at least ~4 minutes after logon before rebooting, or the sample is void.
produced nothing — most likely because the tray process was killed before its ~1.1 s
timers fired. So: reboot once from the Start menu immediately and you will very likely
conclude it doesn't reproduce; the precondition above is the difference.
Two measurement traps for anyone reproducing this:
Do not use "no popup appeared" as the success signal.
ErrorMode=2(
HKLM\SYSTEM\CurrentControlSet\Control\Windows) suppresses only the display of thesedialogs — creation and Event 26 recording continue. I set it on 10-01 at 16:53:19, and
every shutdown since still logged popups that were invisible on screen:
Ground truth is
Application Popup/ Event ID 26 in the System log, not what you saw.Query-window trap: the shutdown-side Event 26 is written before the next boot, so
StartTime = <this boot's LastBootUpTime>returns nothing for shutdown popups. Querya window around the preceding 1074 (±120 s). Verified live: the newest
wsl.exerecord is2026-10-01 18:03:41, which precedes the 18:04:18 boot.
Split by family before counting. Event 26 is a superset — 283 records on this machine
over 27 days, of which only 92 are
wsl.exe. On the same machine 87 are an unrelatedboot-time driver load failure (
XLGuard.sys) and 41 are an unrelated app crash. Filter onthe joined property text; the caption (
Properties[0]) is empty for some families, somatching caption alone silently drops them. See Appendix B.
4. The observable contract, and the test I can't write
If it's useful, the contract stated so it can fail:
A test for that does not need a real shutdown: with a fake/replaceable process-spawner
injected into the keep-alive path, drive "connection dropped" after a simulated
session-end and assert zero spawns are recorded. That test fails on the current build
and passes once the guard exists. Given §1, a regression test that asserts "the repair
loop does not call the spawner once shutdown has started" is probably the cheapest form.
5. What I can and cannot contribute
I can keep collecting Event 26 / tray-log data on this machine, run an instrumented build
and send you the logs, and verify a fix on real reboots (≥4 min idle after logon, then
reboot, then check Event 26 — not the screen).
I cannot hand you a failing regression myself: I don't have a working build
environment for the tray here, so I can't compile or run the test project. That is the one
piece I can't produce.
Appendix A —
wsl.exeEvent 26 bursts, 2026-09-16 .. 2026-10-01Application Popup/ System / Event ID 26, joined property text matchingwsl.exe,grouped into bursts by a >120 s gap. 92 records, 35 bursts, 16 days.
Δ1074= popup time minus the nearest Event 1074 within ±120 s (positive = popup cameafter the 1074);
boot= next Event 6005 within [−60 s, +600 s].Notes:
popup +1.4 .. +4.7 s later. That tight band is the whole 1.0–1.2 s reconnect timer
plus spawn overhead — which is why I think the trigger is the reconnect/keepalive
spawn, not something at boot.
−13.7 s). I would not build anything on ordering inside the ±120 s window; a single
physical restart logs two 1074s (e.g. 09-22 20:51:53
StartMenuExperienceHost.exe,then 20:52:01
winlogon.exe, reason0x500ff).dedupe 1074s, and §3 explains why "no popup" is not a valid negative.
18:03:40–41, n=3) has its 1074 at18:03:39and the next boot at18:04:18. Those three popups were invisible onscreen because
ErrorMode=2was already active.Appendix B — Event 26 is a superset; split by family first
All 283 Event 26 records on this machine, 2026-09-05 15:55:44 .. 2026-10-01 18:04:20,
grouped by joined property text:
wsl.exe - Application Error/应用程序无法正常启动(0xc0000142)。\SystemRoot\system32\drivers\XLGuard.sys failed to load+ numeric argsFMAudioMonitor.exe - 应用程序错误(0xc0000005)whoami.exe - Application Error(0xc0000142)where.exe,powershell.exe,cscript.exe,runas.exe,clip.exe,wscript.exe,openfiles.exe,certutil.exe,tasklist.exe,timeout.exe,choice.exe,msinfo32.exe,dxdiag.exe(all 0xc0000142)Windows - Virtual Memory Minimum Too Lowsvchost.exe - Unknown Hard Error)The 92 and the 87 must never be summed: one is a shutdown-time spawn failure, the other a
boot-time driver load failure. Both land in Event ID 26.
Appendix C — commands used
Burst detection (§2 / Appendix A):
Family split (Appendix B) — join all properties before matching; the caption is empty
on some families, and matching on caption alone silently drops them:
Environment: Windows 11 Home China 10.0.26300; OpenClaw Companion 2026.9.4.0
(tray data:
%LOCALAPPDATA%\OpenClawTray\).petruslin commentedon Oct 1, 2026
Split into three narrower jobs
The autonomous fix for this issue was blocked because the artifact it produced spanned three subsystems. The three spawn paths are now tracked separately, one production file each:
src/OpenClaw.Connection/ManagedLocalGatewayPortProvenanceService.cs. This is the point wherewsl.exeis actually created (:102, second start:213).src/OpenClaw.Tray.WinUI/App.xaml.cs. The keep-alive is started in a detached task (:957) and the managed-local auto-repair adapter discards the cancellation token it is handed (:973).src/OpenClaw.Shared/WebSocketClientBase.cs. The reconnect retry loop reachesReconnectAuthorizationAsync(:621) with no session-ending check.This issue stays open as the evidence trail: the 16-day Event 26 census, the Event 1074 ordering, the tray-log excerpts, and the family split against the unrelated
XLGuard.sysboot popup. Each split issue carries its own, narrower fix artifact, so the previously blocked implementation job on this issue does not need to be re-run.One note on the reported machine's local mitigation, since it can look like the defect is gone:
HKLM\SYSTEM\CurrentControlSet\Control\Windows\ErrorMode = 2suppresses the display of the "Application Error" dialog only. Process creation still fails, and Event 26 is still recorded on every affected shutdown. The failure itself is untouched.github-actions commentedon Nov 4, 2026
This issue has been automatically marked as stale due to inactivity.
Please add updated OpenClaw Windows details or it will be closed.
github-actions commentedon Nov 29, 2026
This issue has been automatically marked as stale due to inactivity.
Please add updated OpenClaw Windows details or it will be closed.