Back to catalog / Agent workflows
Summarize session memory at task milestones
Create compact carry-forward summaries at explicit milestones so work can continue without replaying every turn.
Goal
Create compact carry-forward summaries at explicit milestones so work can continue without replaying every turn.
Steps
- Choose milestone triggers such as phase completion or context threshold and capture decisions, open questions, and next actions. [source08]
- Write the summary to the session’s designated memory artifact and retain a link to the source conversation or event range. [source08]
- Start a fresh context from that artifact and check that it preserves constraints and unresolved items without inventing decisions. [source08]
How to verify
Open a fresh context from the saved milestone artifact; verify decisions, unresolved questions, constraints, and next actions are present and no unapproved decision was added.
Troubleshooting
If the new context omits an open item, revise the artifact’s explicit sections and source links; do not fill gaps by guessing what was decided.
Permissions
Prerequisites
- Python and an Anthropic API key; a private session store with retention rules.
Permissions
- Use approved test or anonymized data only; scope credentials to each workflow, and require explicit approval for external writes.
Limitations
Model output may be incomplete or wrong; API and beta behavior can change, so verify against the pinned source and current service behavior.
Pinned upstream source
- Repository
- anthropics/anthropic-cookbook
- File path
- misc/session_memory_compaction.ipynb
- Pinned commit
9c1e493ddd2b82df399d2a61b9c806c539e18be6- Source checked
- 2026-10-14 · Reviewed against the pinned upstream source
Repository metrics
These values describe the upstream repository, not popularity or likes for an individual skill or playbook.
- Stars
- Not collected
- Forks
- Not collected
- Observed at
- Not collected
No metrics snapshot is available yet.
License: MIT
Main topic
Turn ecommerce campaign materials into a reviewable weekly brief