Windows is a hard place to run long-lived AI coding agents.
The failure mode is often quiet. A terminal window may still be open. A process may still exist. But halfway through a task, the gateway stops responding, memory search breaks, or a background service silently exits.
This post summarizes two concrete trails from recent work:
- OpenClaw merged a fix for a transient Windows file-lock problem in memory index swaps.
- Hermes did not merge our Windows gateway helper PR, but a maintainer clarified how this work fits into a broader Windows support plan.
OpenClaw: transient file locks during memory index swaps
PR:
https://github.com/openclaw/openclaw/pull/76024
During memory reindexing, OpenClaw swaps SQLite index files. On Windows, fs.rename can fail when a file is briefly held by the system, antivirus software, an indexer, or another process.
The errors can look like:
EBUSY
EPERM
EACCES
From the user side, the symptom may be vague: memory search fails, or an agent task gets stuck.
The merged fix is intentionally narrow. It adds bounded retries around the atomic index swap path. It does not rewrite the memory system or turn every failure into a retry.
That is the kind of stability work that tends to matter in real agent use.
Cleanup paths matter too
Related OpenClaw trail:
https://github.com/openclaw/openclaw/pull/59137
This was not our original PR. We contributed a focused follow-up around cleanup ordering: close the temporary database before trying to remove temporary SQLite files.
On Windows, that detail matters. If the file handle is still open, the cleanup path can fail even if the main logic is correct.
Hermes: gateway lifecycle on Windows
PR:
https://github.com/NousResearch/hermes-agent/pull/15846
The Hermes proposal focused on a safer Windows gateway lifecycle:
- start through a user-level Scheduled Task;
- avoid relying on a visible PowerShell or CMD window;
- track runtime state;
- keep logs;
- provide best-effort restart behavior.
The PR was closed and not merged.
The maintainer response was still useful: Hermes needs a consolidated Windows design rather than a set of piecemeal native-Windows PRs. The work was catalogued into the internal Windows support plan and may inform a later consolidated PR.
The lesson: do not trust the window
A visible terminal window is not a health check.
For Windows agents, the boring pieces matter:
- background startup;
- health checks;
- logs;
- bounded retries;
- rollback paths;
- small upgrade tests before using a new version for real work.
AI-agent demos usually focus on model behavior. Real usage eventually runs into process lifecycle, file locks, environment inheritance, and recovery.
Those are not side issues. They decide whether the agent can keep working.
The canonical version with the image cards and evidence trail is here:
https://kunpeng-ai.com/en/blog/openclaw-hermes-windows-agent-stability-evidence-trail/


