November 2026
What the next run remembers
Active Memory turns completed zeroshot runs into reusable lessons. Postmortems keep those lessons current; file and keyword indexing reliably brings them back during the work.
An agent can fix a mistake during review and repeat it in its next session. The useful detail might be a repository quirk, or a better way to carry out one step of a workflow. A correction needs to survive the conversation and reach the next agent when it becomes relevant.
Active Memory gives zeroshot that continuity. It learns from observed work, keeps concise lessons, and supplies relevant guidance to later runs.
A postmortem after each run
When a run finishes, a built-in postmortem reviews agent outputs and recorded tool activity. Four specialists handle discovery and maintenance separately for repository lessons and graph lessons.
A new lesson needs observed evidence, a concrete recommendation and a reason to expect reuse. Repository discoveries also need verification against current source. Routine task summaries and generic advice don’t qualify; a postmortem can finish without adding anything.
Repository lessons
What matters in this codebase
- Discover
- Find reusable lessons, backed by run evidence and current files.
- Maintain
- Check existing advice against the source. Update or retire it.
Graph lessons
How to carry out this workflow
- Discover
- Find procedural lessons for agent nodes that executed.
- Maintain
- Check advice against the node’s instructions and output contract.
Why retrieve during the work?
Loading every lesson into the initial prompt makes each task carry advice about unrelated work. A memory-search tool adds a different dependency: the agent has to recognize that it is missing something and choose to look it up.
We use signals the agent already produces. Reading a file or searching for an identifier gives the runtime something concrete to match. Relevant repository advice enters the conversation automatically, without a separate memory-search call.
Recall what matches
A new run freezes a scoped memory snapshot. Repository recall uses resident inverted indexes: exact files, containing folders, whole identifiers and small keyword groups whose terms must all match. File matches rank first.
Lookup needs no model call, network request or filesystem scan. Zeroshot installs a hook, extension or plugin in the harness’s tool lifecycle. It passes the tool’s name, arguments and working directory to the shared memory lookup, then adds matching lesson text to the conversation for the next model decision.
Read("src/generated/client.ts")
Update api/schema.json and run make api-client. The repository’s wrapper preserves an auth-header patch that direct generation drops.
Unrelated lessons stay in the store.
| Harness | Native delivery |
|---|---|
| Codex | A PreToolUse hook returns lesson text as additional context. |
| Claude Code | A PreToolUse hook returns lesson text as additional context. |
| GitHub Copilot CLI | A preToolUse RPC callback returns the lessons as additional context. |
| Pi | An extension appends lesson text to the tool_result after the tool finishes. |
| OpenCode | A plugin appends lessons to the tool output through tool.execute.after. |
| Hermes | A native integration attaches lessons as model-facing notices after tool-result bookkeeping. |
Every harness uses the same index and delivery budget. Each card includes its title and recommendation; cards that don’t fit are skipped. A lesson version appears at most once per session, within a cumulative budget of 2 KiB by default.
Graph lessons follow a separate route: they enter the relevant node’s instructions at startup, scoped to that exact graph version. They preserve procedural learning even when the work has no repository file to match.
Hooks guide the next model decision. They can’t revise a tool call already issued, so reads and searches are useful early triggers. A lesson triggered by an edit can inform a later correction. In our experience, agents follow this injected guidance very reliably across model capabilities and reasoning effort levels. Tests and reviewers still check the result.
Scale this to your organization
On zeroshot Platform, Active Memory is enabled by default and shared across your organization. A lesson from one person’s run can help the next person working on the same repository or workflow.
Each run uses a frozen snapshot. Before saving, its postmortem reconciles findings with current shared lessons. Revision checks prevent stale overwrites: if another run changed those lessons, the postmortem refreshes and reconciles again.
