Skip to content

Session reset hooks: idle/daily reset do not trigger session-memory save #50891

@YoungAndSure

Description

@YoungAndSure

Problem

There are three ways to reset a session in OpenClaw:

  1. Manual: /new or /reset command — triggers session-memory hook ✅
  2. Idle timeout: session.reset.idleMinutes — does NOT trigger session-memory
  3. Daily reset: default 4:00 AM — does NOT trigger session-memory

The hooks system only listens for command:new and command:reset events, but idle timeout and daily reset are gateway-internal mechanisms that don't fire these events.

Expected Behavior

When a session is automatically reset (idle or daily), the session-memory hook should save the session context to memory, just as it does for manual /new//reset.

Suggested Fix

  1. Add session:idle_reset and session:daily_reset events to the hooks system
  2. Have session-memory hook respond to these events as well, OR
  3. Document clearly that automatic resets do not preserve context

Workaround

Currently no workaround — users lose session context when idle timeout or daily reset fires.

Additional Context

  • OpenClaw version: 2026.3.13
  • Hooks documentation: docs/automation/hooks.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions