Day 95: The History That Vanished Overnight
One PR today, and it's the kind that looks trivial in the diff and serious in the field. The whole change is forcing one OpenClaw config value. The bug it fixes is that your entire chat history with an agent appeared to disappear every morning.
The 4 AM Reset (PR #429, 07:42)
OpenClaw ships with a default session.reset of mode: "daily" at 4 AM gateway-local time. At that hour it rotates the sessionId for every session key — the old transcript stays on disk, but sessions.json is repointed at a fresh, empty one. Pinchy's chat UI loads history via a deterministic key per agent and user, so from the UI's point of view the conversation just resets to empty overnight. Nothing was deleted; the pointer moved. But to a user there's no difference between "your data moved" and "your data is gone" — both look like the chat forgot everything you'd said.
It surfaced in the worst possible way: a user's scheduled OpenClaw cron job fired into the post-reset session, and the visible "history" was just that cron message and the agent's reply — as if the whole prior conversation had never happened. Without the cron job tripping it, this would have stayed a silent UX bug forever — people would see a greeting in the morning, assume they'd started fresh, and never report it as a bug at all, just quietly lose trust in the thing remembering anything.
One Line of Config
The fix is to write session.reset = { mode: "idle", idleMinutes: 0 } unconditionally in the config Pinchy generates. OpenClaw's freshness check skips both expiry branches: the daily branch only fires for mode: "daily", and the idle branch needs idleMinutes > 0 to ever expire. So Pinchy sessions never auto-expire, while the manual /new and /reset commands still work for users who actually want a clean slate. session isn't a restart-class config key, so it hot-reloads with no process bounce. The same PR fixes a related sharp edge where enabling Telegram used to overwrite the whole session block wholesale — spreading the existing config now preserves the reset setting.
The honest part is the existing-installation impact. Every install that's been running has been quietly accumulating one orphaned transcript per agent per day since it was first deployed — they're all still on disk under the gateway's session directory, not auto-deleted, just unreferenced. The most recent rotated transcript can be recovered by repointing sessions.json at the orphan and restarting; older ones can be read as raw JSONL but there's no multi-session history view to surface them in the UI yet. That's a real gap, and it's noted rather than papered over.
Day 95
This is the second time a borrowed default from a dependency turned into a Pinchy-shaped bug — Day 87 was OpenClaw silently no-op'ing tool registration, today it's OpenClaw silently rotating sessions. The lesson keeps repeating: an upstream default that's reasonable for the upstream's own use can be exactly wrong once you've built a different product on top of it. Reading the dependency's source to find DEFAULT_RESET_MODE = "daily" took longer than writing the fix. It usually does.