-
-
Notifications
You must be signed in to change notification settings - Fork 69.4k
Bug: session-memory hook (and command-logger) do not fire on /new or /reset commands #23027
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
Labels
staleMarked as stale due to inactivityMarked as stale due to inactivity
Description
Summary
The session-memory and command-logger bundled hooks are configured and show as ✓ ready in openclaw hooks list, but neither hook fires when /new or /reset is issued via Discord.
Environment
- OpenClaw version: 2026.2.21-2
- OS: macOS (Darwin 25.2.0, arm64)
- Channel: Discord (DM)
- Agent:
agent:main:main
Configuration
Both hooks are enabled in openclaw.json:
{
"hooks": {
"internal": {
"entries": {
"session-memory": {
"enabled": true,
"messages": 25
}
}
}
}
}openclaw hooks list output:
Hooks (4/4 ready)
✓ ready 💾 session-memory Save session context to memory when /new or /reset command is issued
✓ ready 📝 command-logger Log all command events to a centralized audit file
Steps to Reproduce
- Start a session via Discord DM
- Issue
/newcommand - Session resets correctly (new session ID is created, transcript file is rotated to
.reset.*)
Expected Behavior
command-loggerappends a JSON line to~/.openclaw/logs/commands.logsession-memorycreates a dated slug file in<workspace>/memory/YYYY-MM-DD-<slug>.md
Actual Behavior
~/.openclaw/logs/commands.logis empty / not created- No memory slug file is created in
memory/ - No
session-memoryorcommand-loggerentries appear in gateway logs - The
command:newevent appears to never fire despite the session reset occurring successfully
Evidence
- Session was reset at
2026-02-21T21:13:04Z(confirmed via.reset.file:789a368a-4877-4b12-af11-2858a4d49c48.jsonl.reset.2026-02-21T21-13-04.878Z) - Gateway log around reset time shows normal session rotation but zero hook-related entries
commands.logfile is empty — confirming thecommand:newevent is not being dispatched to hooks at all
Notes
The gateway was restarted immediately before the /new was issued (config change prompted a restart). Hooks showed ready after restart. The session itself reset cleanly. The hook event dispatch step appears to be silently skipped.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
staleMarked as stale due to inactivityMarked as stale due to inactivity
Type
Fields
Give feedbackNo fields configured for issues without a type.