Knowledge
Memory Bank Continuity
Give stateless agents a project spine.
Use when
Agent work spans multiple sessions, contributors, or tools and context keeps getting rebuilt from scratch.
Cadence
At the start and end of multi-session agent work
Verification
Project brief, active context, decisions, tech constraints, and progress are current enough for a fresh agent to continue safely.
Structured loop spec
| Field | Value |
|---|---|
| Name | Memory Bank Continuity |
| Category | Knowledge |
| Trigger | At the start and end of multi-session agent work |
| Objective | Give stateless agents a project spine. |
| Allowed inputs | Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop |
| Allowed actions | At session start, read the project brief, active context, tech constraints, system patterns, and progress files.; During work, record durable decisions, current blockers, changed commands, and important path references.; At session end, update active context and progress with what changed, what passed, what failed, and what comes next.; Do not store secrets, raw transcripts, or giant code dumps in memory files.; Verify a fresh-agent handoff can state goal, current state, commands, blockers, and next action. |
| Verification | Project brief, active context, decisions, tech constraints, and progress are current enough for a fresh agent to continue safely. |
| Stop condition | Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required. |
| Budget | Set a time, turn, token, retry, file, or dollar cap before running the loop. |
| Approval boundary | Human approval required before public, destructive, financial, legal, account, or production-impacting actions. |
| Safe output | Draft, report, checklist, table, or approval-gated recommendation |
| Works with | Claude, ChatGPT, Gemini, any tool-using AI assistant |
Steps
- At session start, read the project brief, active context, tech constraints, system patterns, and progress files.
- During work, record durable decisions, current blockers, changed commands, and important path references.
- At session end, update active context and progress with what changed, what passed, what failed, and what comes next.
- Do not store secrets, raw transcripts, or giant code dumps in memory files.
- Verify a fresh-agent handoff can state goal, current state, commands, blockers, and next action.
Prompt
Run the Memory Bank Continuity loop. Read the repo's project brief, active context, tech constraints, system patterns, and progress files before work. During and after the session, update durable decisions, blockers, changed commands, important paths, verification evidence, and next action. Do not store secrets, raw transcripts, or giant code dumps. Verify the handoff lets a fresh agent continue without rereading the whole chat.Run in Claude Code
Paste this into Claude Code (or any tool-using agent) to run the loop bounded: one change per round, the same verification every round, durable state files, and explicit stop conditions.
Run the "Memory Bank Continuity" loop from AI Loop Library (https://ailooplibrary.com/loops/memory-bank-continuity/) as a bounded loop.
Goal: Give stateless agents a project spine.
Rules: one change per round; run the same verification every round (Project brief, active context, decisions, tech constraints, and progress are current enough for a fresh agent to continue safely.); append each round to docs/loops/memory-bank-continuity/progress.md and update docs/loops/memory-bank-continuity/state.json; stop on verifier pass, 8 rounds, 3 consecutive failed verifications, no progress, a blocker, or anything needing human approval (money, production, outbound, deletion). Finish with a proof report: rounds used, changes made, verification output, remaining risk, and the next human decision.