You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Gateway hangs from session cleanup 2026.4.x #73924
After 2026.4.x the gateway hangs and session cleanup writes are spammed to console. https://pastebin.com/jCc0pVHJ https://pastebin.com/xTtva5XD https://pastebin.com/3h6TbxGE
Disabling Active-Memory and Dreaming made a very slight improvement
Current version im using is 2026.4.26 Happening since atleast 2026.4.11 but worse after upgrading to 2026.4.26
Steps to reproduce
NOT_ENOUGH_INFO
Expected behavior
Gateway isnt supposed to hang with the session cleanup spam.
Actual behavior
gateway hangs with session cleanup in console while the gateway is hanging.
Thanks for the context here. I did a careful shell check against current main, and this is already implemented.
Current main already removes the session-store rotation path that matches the reported v2026.4.26 log spam. The user-linked logs show repeated sessions/storesessions.json.bak.* backup/cleanup messages around a 15 MB store, and current main commit 490e6d6 removes rotateSessionFile, ignores legacy session.maintenance.rotateBytes, documents that behavior, and adds regression tests that hot oversized writes no longer create rotation backups. The fix is on main only; no release tag contains it yet.
Best possible solution:
Close this as implemented on current main, keep the 490e6d6 session-store maintenance behavior, and ship it in the next release. If a build containing that commit still hangs without sessions.json.bak.* spam, open a new focused bug with fresh logs and the remaining gateway timeout/provider/channel symptoms.
What I checked:
Reporter log matches removed rotation path: The user-linked Pastebin log for v2026.4.26 shows repeated sessions/store messages backing up sessions.json.bak.* for a 15,330,788-byte session store, cleaning old backups, and then gateway connect timeouts. citeturn2view0.
Old release implemented noisy rotation: In v2026.4.26, rotateSessionFile copied oversized sessions.json to sessions.json.bak.<timestamp> and logged backed up session store file before rotation plus old-backup cleanup; saveSessionStoreUnlocked called it before disk-budget enforcement. (src/config/sessions/store-maintenance.ts:351, be8c24633aaa)
Current main removes rotation from runtime config: Current main's resolved session maintenance config no longer includes rotateBytes, and rg finds no live rotateSessionFile, backup-spam log strings, or default rotate-size constant in runtime source. (src/config/sessions/store-maintenance.ts:121, 7a88117f429c)
Regression tests cover hot oversized writes: Current tests explicitly save an oversized hot session store repeatedly with legacy rotateBytes configured and assert no sessions.json.bak.* files are created; a second test covers destructive maintenance rewrites. (src/config/sessions/store.pruning.integration.test.ts:580, 7a88117f429c)
Fix provenance: Commit 490e6d6 removed rotateSessionFile/rotateBytes from session maintenance, added no-backup regression tests, and updated session docs. Its commit timestamp is 2026-04-28T18:50:51-04:00. (src/config/sessions/store-maintenance.ts:1, 490e6d6dc590)
Likely related people:
jinjim coriase@gmail.com: Authored commit 490e6d6, which removed session-store rotation backups, updated docs, and added the no-backup regression tests that now define the current behavior. (role: fixed current behavior; confidence: high; commits: 490e6d6dc590; files: src/config/sessions/store-maintenance.ts, src/config/sessions/store.ts, src/config/sessions/store.pruning.integration.test.ts)
sallyom: Commit 490e6d6 lists sallyom as co-author/reviewer for the change that removed the rotation backup path and documented the deprecated config key. (role: reviewer/co-author on current fix; confidence: medium; commits: 490e6d6dc590; files: src/config/sessions/store-maintenance.ts, src/config/sessions/store.pruning.integration.test.ts, docs/reference/session-management-compaction.md)
Peter Steinberger steipete@gmail.com: The v2026.4.26 tag and shallow blame for the old rotateSessionFile implementation attribute the shipped release snapshot containing the noisy backup path to Peter; this is routing context, not fault attribution. (role: release snapshot provenance; confidence: low; commits: be8c24633aaa; files: src/config/sessions/store-maintenance.ts, src/config/sessions/store.ts)
So I’m closing this as already implemented rather than keeping a duplicate issue open.
Codex review notes: model gpt-5.5, reasoning high; reviewed against 7a88117f429c; fix evidence: commit 490e6d6dc590, main fix timestamp 2026-04-28T18:50:51-04:00.
Activity
clawsweeper commentedon Apr 29, 2026
Thanks for the context here. I did a careful shell check against current
main, and this is already implemented.Current main already removes the session-store rotation path that matches the reported v2026.4.26 log spam. The user-linked logs show repeated
sessions/storesessions.json.bak.*backup/cleanup messages around a 15 MB store, and current main commit 490e6d6 removesrotateSessionFile, ignores legacysession.maintenance.rotateBytes, documents that behavior, and adds regression tests that hot oversized writes no longer create rotation backups. The fix is on main only; no release tag contains it yet.Best possible solution:
Close this as implemented on current main, keep the 490e6d6 session-store maintenance behavior, and ship it in the next release. If a build containing that commit still hangs without
sessions.json.bak.*spam, open a new focused bug with fresh logs and the remaining gateway timeout/provider/channel symptoms.What I checked:
sessions/storemessages backing upsessions.json.bak.*for a 15,330,788-byte session store, cleaning old backups, and then gateway connect timeouts. citeturn2view0.rotateSessionFilecopied oversizedsessions.jsontosessions.json.bak.<timestamp>and loggedbacked up session store file before rotationplus old-backup cleanup;saveSessionStoreUnlockedcalled it before disk-budget enforcement. (src/config/sessions/store-maintenance.ts:351, be8c24633aaa)rotateBytes, andrgfinds no liverotateSessionFile, backup-spam log strings, or default rotate-size constant in runtime source. (src/config/sessions/store-maintenance.ts:121, 7a88117f429c)rotateBytesconfigured and assert nosessions.json.bak.*files are created; a second test covers destructive maintenance rewrites. (src/config/sessions/store.pruning.integration.test.ts:580, 7a88117f429c)sessions.json.bak.*backups during Gateway writes, and the doctor legacy migration warns thatsession.maintenance.rotateBytesis deprecated and removes it withdoctor --fix. Public docs:docs/reference/session-management-compaction.md. (docs/reference/session-management-compaction.md:84, 7a88117f429c)rotateSessionFile/rotateBytesfrom session maintenance, added no-backup regression tests, and updated session docs. Its commit timestamp is 2026-04-28T18:50:51-04:00. (src/config/sessions/store-maintenance.ts:1, 490e6d6dc590)Likely related people:
src/config/sessions/store-maintenance.ts,src/config/sessions/store.ts,src/config/sessions/store.pruning.integration.test.ts)src/config/sessions/store-maintenance.ts,src/config/sessions/store.pruning.integration.test.ts,docs/reference/session-management-compaction.md)rotateSessionFileimplementation attribute the shipped release snapshot containing the noisy backup path to Peter; this is routing context, not fault attribution. (role: release snapshot provenance; confidence: low; commits: be8c24633aaa; files:src/config/sessions/store-maintenance.ts,src/config/sessions/store.ts)So I’m closing this as already implemented rather than keeping a duplicate issue open.
Codex review notes: model gpt-5.5, reasoning high; reviewed against 7a88117f429c; fix evidence: commit 490e6d6dc590, main fix timestamp 2026-04-28T18:50:51-04:00.