Two separate bugs can wipe OpenClaw agent sessions clean. One is a macOS kernel flaw that severs TCP connections after approximately 49.7 days of continuous uptime — a figure Photon Codes derived from the 2^32 millisecond integer limit, not a cycle they observed completing. The other is a Node.js setTimeout overflow inside OpenClaw itself, documented in GitHub issue #9572 with an actual crashed gateway as evidence. They do not share the same trigger point: the setTimeout overflow fires at around 24.8 days of continuous gateway uptime, well before the macOS kernel bug could ever activate. Both produce the same result: a gateway that stops responding, followed by a restart that wipes every agent session clean.
The real story is what happens after the restart.
The setTimeout bug
OpenClaw's NO_TIMEOUT_MS constant is set to 2,592,000,000 milliseconds — 30 days. That value gets passed to Node.js's setTimeout() function, which accepts 32-bit signed integers. The maximum value a 32-bit signed integer can hold is 2,147,483,647. When the timeout value exceeds that, Node.js issues a TimeoutOverflowWarning and silently sets the duration to 1 millisecond instead of failing loudly.
That 1ms timeout breaks the gateway's internal WebSocket communication. Callbacks fire immediately, promises resolve incorrectly, and the message queue stalls. The gateway process stays alive — it holds its port, it responds to health checks — but it stops processing work. In the reported case, an OpenClaw 2026.2.3-1 gateway running on macOS Darwin 24.5.0 became unresponsive after the overflow, requiring a pkill -HUP to restore service.
A separate issue, #10626, describes the same overflow on AWS a1.large instances running the google-gemini-cli provider, where the rapid retry loop from the 1ms timeout triggered memory exhaustion and a system crash. The suggested fix in both cases is the same: clamp the timeout value to MAX_SAFE_TIMEOUT_MS (2^31 - 1) before passing it to setTimeout.
The macOS kernel bug
Photon Codes identified a flaw in macOS TCP networking that severs connections after a device has been continuously online for approximately 49.7 days — 2^32 milliseconds. They calculated the trigger point from the integer limit, characterized the mechanism, and reported it as a theoretical detonation window. Whether any specific machine has run long enough to trigger it is a separate question from whether the bug exists and what its consequences would be. The practical consequence for an OpenClaw gateway is the same as the setTimeout overflow: the TCP connection drops, the session state is lost, and the restart begins from a blank slate.
The memory problem
The bugs are fixable. The design gap is not a bug.
OpenClaw has no automatic session memory persistence. According to its own documentation, "OpenClaw does not have memory by default. Every session starts fresh. Every project looks the same to the agent — a blank slate with whatever context you put in front of it." The context window is working memory, not long-term storage. When the session ends — voluntarily, via the setTimeout overflow, or via a kernel-level crash — the context window is gone.
This is not hidden. It is documented. But it sits in tension with how AI agents are marketed. "Persistent AI assistant" appears in product descriptions; "your agent remembers your preferences across sessions" appears in changelogs. The reality is a blank slate after every restart, unless the user has manually configured a memory layer.
Third-party tools have moved into this gap. MemClaw, a skill for OpenClaw built by Felo-Inc, implements project-scoped workspaces, persistent decision logs, and artifact storage across sessions. ClawVault, built by Versatly, offers session checkpointing via a CLI with wake/checkpoint workflows. Both require explicit installation and configuration — they are not part of the default OpenClaw setup.
The accountability gap is not that the product fails. It is that it fails in a way that contradicts its own marketing, and the failure mode — total memory loss — is not disclosed as a feature.
What this means
If you run OpenClaw on a Mac that hasn't been restarted in about 25 days and the setTimeout overflow fires, your agent sessions are gone. If you run it on a Mac that hasn't been restarted in 49.7 days and the kernel bug fires, your agent sessions are gone. If you restart voluntarily, your agent sessions are gone. The only way to preserve context across cycles is to build it yourself, or to add a third-party memory layer that is not bundled by default.
The irony is precise. AI agents are, among other things, infrastructure for remembering things. OpenClaw agents forget everything at the end of every session by design, and the only protection against that forgetting is optional tooling that most users don't know exists.
The fix for the setTimeout overflow is a one-line clamp. The fix for the macOS kernel bug is a system restart before day 50. The fix for the memory problem is an architectural decision that OpenClaw has not made — and that the marketing has quietly made for them.
Primary sources: GitHub issue #9572 (gateway hang, setTimeout overflow on macOS); GitHub issue #10626 (setTimeout overflow crash on AWS a1.large); Felo.ai OpenClaw Memory Management Guide (no automatic memory persistence); Photon Codes blog (macOS TCP kernel bug mechanism and 49.7-day projection); Photon Codes Spectrum (company context).