openclaw - 💡(How to fix) Fix [Feature]: Add hook event for automatic daily session reset (4AM rotation) [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#80290Fetched 2026-05-11 03:16:44
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
2
Timeline (top)
closed ×1commented ×1

Fix Action

Fix / Workaround

The available session-related events are:

  • command:new/new command issued
  • command:reset/reset command issued
  • session:compact:before / session:compact:after — compaction lifecycle
  • session:patch — session properties modified
RAW_BUFFERClick to expand / collapse

Problem

The session-memory bundled hook only listens for command:new and command:reset events — i.e., when a user manually types /new or /reset.

However, OpenClaw also performs an automatic daily session reset at 4:00 AM (host local time) by default. When this automatic rotation happens, no hook event fires, so:

  1. The session-memory hook does not save session context before the rotation
  2. Any other hooks that might want to react to a session reset have no event to listen to
  3. Conversation history from the previous day is silently discarded

Expected behavior

There should be a hook event (e.g., session:reset:auto or session:reset:pre) that fires before the automatic daily session rotation, so that hooks like session-memory can capture the session context before it is rotated away.

Ideally:

  • A new lifecycle event for automatic (non-command) session resets
  • The session-memory hook could optionally listen to this event as well
  • The event context would include the previous session entry (similar to command:reset)

Current hook events reference

The available session-related events are:

  • command:new/new command issued
  • command:reset/reset command issued
  • session:compact:before / session:compact:after — compaction lifecycle
  • session:patch — session properties modified

There is no event for the automatic daily reset path.

Additional context

  • Users who rely on the session-memory hook for daily journaling/continuity miss entries when the automatic reset happens silently
  • The automatic reset is controlled by the gateway internally (not a command), so no existing hook event covers it
  • A session:reset:auto (or similar) event would allow hooks to react to both manual and automatic session lifecycle events consistently

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

There should be a hook event (e.g., session:reset:auto or session:reset:pre) that fires before the automatic daily session rotation, so that hooks like session-memory can capture the session context before it is rotated away.

Ideally:

  • A new lifecycle event for automatic (non-command) session resets
  • The session-memory hook could optionally listen to this event as well
  • The event context would include the previous session entry (similar to command:reset)

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Feature]: Add hook event for automatic daily session reset (4AM rotation) [1 comments, 2 participants]