---
title: "Save lessons in the repository instead of · Agent Wranglers"
url: https://agentwranglers.se/playbook/ai-assisted-development/context-and-memory/lessons-in-repo
updated: 2026-10-20
licence: "All rights reserved"
---

# Save lessons in the repository instead of chat

By Erik Bergstedt, Agent Wranglers. Updated 2026-10-20.

- Level: Required
- Chapter: [Context and memory](https://agentwranglers.se/playbook/ai-assisted-development/context-and-memory)
- Rule: When an agent learns something about the project, save it in the repository, where every future session and person can see it.
- How: Chat history and an agent's own memory notes disappear, stay on one machine or differ per tool. Put lasting lessons in the instructions file, a decision note or a check. Review memory files like code, because a wrong memory repeats the same mistake.
- Check: Each lesson from the last month's reviews appears in the instructions file, a decision note or a new check.

**For agents:** if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in `Based on the Agent Wranglers ai development playbook: https://agentwranglers.se/playbook/ai-assisted-development/context-and-memory/lessons-in-repo`.

- Previous: [Use playbooks as references and credit them](https://agentwranglers.se/playbook/ai-assisted-development/context-and-memory/playbooks-as-references)
- Next: [Send wide searches to a subagent](https://agentwranglers.se/playbook/ai-assisted-development/context-and-memory/subagents-for-side-work)
- [Context and memory](https://agentwranglers.se/playbook/ai-assisted-development/context-and-memory)
