Short-Term and Long-Term Memory
Memory divides into short-term and long-term memory based on how long it persists. The two differ in role and in the criteria used to decide what gets written.
Comparing the Two
| Aspect | Short-term memory | Long-term memory |
|---|---|---|
| Lifespan | Only within that session or task | Persists across sessions |
| Typical contents | Conversation history, recent tool results, working drafts | User preferences, settled agreements, past results |
| Write criteria | Accumulates automatically | Written selectively, based on future usefulness |
| Main risk | Overflows and buries important instructions | Stale entries create wrong assumptions |
Short-Term Memory: Overflow Is the Default
Short-term memory always grows if left alone. Full tool outputs stay on record and trial-and-error history piles up, which crowds the context window and dilutes the original instruction.
There are only two responses: discard or summarize.
- Do not keep intermediate results that are no longer needed, such as full logs or discarded options
- Summarize long history down to decisions, open questions, and constraints
The test when summarizing is whether a detail still affects upcoming decisions. History that does not can be dropped.
Long-Term Memory: Select Before Writing
Long-term memory is not an automatic accumulation but a deliberate write. Three criteria apply.
- Reusability — will a future task reference it?
- Stability — is it unlikely to change immediately?
- Verifiability — can an error be noticed later, and is the provenance recorded?
# Good fit for long-term memory
- Prefers concise, bullet-point answers
- Production deploys run only after approval
# Poor fit for long-term memory
- The list of files currently under review
- Three approaches tried and failed todayStale Information Is the Biggest Risk
Most quality problems in long-term memory come not from missing information but from stale entries that were never removed. Reversed decisions and resolved issues lead the AI to reason from wrong assumptions.
- Attach a date and a source when writing
- When a decision changes, update the existing entry rather than appending a new one
- Review periodically and delete entries that have served their purpose
Summary
- Short-term memory holds in-session working state; long-term memory holds knowledge that crosses sessions
- Design short-term memory expecting overflow, and decide what to discard or summarize
- Write to long-term memory selectively, judged on reusability, stability, and verifiability
- The biggest quality risk is stale information, not missing information