zeroshot research blog

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.

run finishes What did the work teach us? Agent completions + tool receipts

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.
Keep the useful lessons Stored by scope. Available to future runs.
Discovery proposes new lessons. Maintenance revisits existing ones. Each specialist works within its own scope.

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.

the agent reads a file Read("src/generated/client.ts")
exact file match
repository lesson Regenerate through the wrapper

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.

An illustrative lesson. The file path selects a small piece of advice for the agent’s context.
How repository lessons reach each harness
HarnessNative delivery
CodexA PreToolUse hook returns lesson text as additional context.
Claude CodeA PreToolUse hook returns lesson text as additional context.
GitHub Copilot CLIA preToolUse RPC callback returns the lessons as additional context.
PiAn extension appends lesson text to the tool_result after the tool finishes.
OpenCodeA plugin appends lessons to the tool output through tool.execute.after.
HermesA 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.

Get started with zeroshot → Read the memory guide →