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
/new command
- Session resets correctly (new session ID is created, transcript file is rotated to
.reset.*)
Expected Behavior
command-logger appends a JSON line to ~/.openclaw/logs/commands.log
session-memory creates a dated slug file in <workspace>/memory/YYYY-MM-DD-<slug>.md
Actual Behavior
~/.openclaw/logs/commands.log is empty / not created
- No memory slug file is created in
memory/
- No
session-memory or command-logger entries appear in gateway logs
- The
command:new event 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.log file is empty — confirming the command:new event 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.
Summary
The
session-memoryandcommand-loggerbundled hooks are configured and show as✓ readyinopenclaw hooks list, but neither hook fires when/newor/resetis issued via Discord.Environment
agent:main:mainConfiguration
Both hooks are enabled in
openclaw.json:{ "hooks": { "internal": { "entries": { "session-memory": { "enabled": true, "messages": 25 } } } } }openclaw hooks listoutput:Steps to Reproduce
/newcommand.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>.mdActual Behavior
~/.openclaw/logs/commands.logis empty / not createdmemory/session-memoryorcommand-loggerentries appear in gateway logscommand:newevent appears to never fire despite the session reset occurring successfullyEvidence
2026-02-21T21:13:04Z(confirmed via.reset.file:789a368a-4877-4b12-af11-2858a4d49c48.jsonl.reset.2026-02-21T21-13-04.878Z)commands.logfile is empty — confirming thecommand:newevent is not being dispatched to hooks at allNotes
The gateway was restarted immediately before the
/newwas issued (config change prompted a restart). Hooks showedreadyafter restart. The session itself reset cleanly. The hook event dispatch step appears to be silently skipped.