Saves conversation history to session log files. Use when user says "保存对话", "保存对话信息", "记录会话", "save session", or "save conversation"...
Create a compact recovery artifact without treating raw conversation history as durable memory.
SessionEnd hook with a transcript path.Do not silently persist raw transcripts, credentials, private customer data, or unbounded agent output. Host support and write authority must be visible; skill metadata alone does not execute a hook.
Claude Code installation can invoke:
agent-playbook session-log
The command reads the host-provided JSONL transcript and stores only bounded, redacted details:
By default, files are private local artifacts:
~/.agent-playbook/sessions/<project-id>/YYYY-MM-DD-<topic>.md
Set AGENT_PLAYBOOK_DATA_DIR or pass --data-dir to move the private data root.
Writing inside a repository is opt-in only:
apb session-log --session-dir ./sessions
If a repository-local directory is selected, verify its ignore and retention
policy before writing. Never assume another repository ignores sessions/.
When the host cannot provide a transcript event, create a user-authorized summary from the context actually visible in the current session. Include only:
State omissions honestly. Do not claim full conversation capture, structured decision extraction, automatic append behavior, or cross-session recall unless the active runtime demonstrably provides it.