28 lines
849 B
Markdown
28 lines
849 B
Markdown
---
|
|
name: session-memory-cus
|
|
description: "Save full session context on /new or /reset with slugged filenames in user timezone"
|
|
metadata:
|
|
{
|
|
"openclaw":
|
|
{
|
|
"emoji": "🧠",
|
|
"events": ["command:new", "command:reset"],
|
|
"requires": { "config": ["workspace.dir"] },
|
|
},
|
|
}
|
|
---
|
|
|
|
# Session Memory Custom Hook
|
|
|
|
Writes full user/assistant transcript context from the previous session into
|
|
`<workspace>/memory/YYYY-MM-DD-slug.md` when `/new` or `/reset` runs.
|
|
|
|
This hook avoids overwriting existing files by choosing a unique filename
|
|
when a collision occurs (it appends `-1`, `-2`, etc. to the base name).
|
|
|
|
Differences from bundled session-memory:
|
|
|
|
- Uses full session context in output file
|
|
- Uses `agents.defaults.userTimezone` (fallback host timezone) for date/time
|
|
- Uses reduced excerpt only for slug generation
|