Skip to content
Specialist context agent · Workspace

Memory Gardener

A workspace cleanup agent for Claude Code, Codex and Cursor

The Memory Gardener finds duplicate or conflicting decisions and lessons and stale open items, and proposes merging, superseding or closing them. It works from the workspace's decisions, lessons, plans and tasks.

Purpose-built for this one job and tested against a quality bar, it gets only the access the job needs, and a workspace owner or admin turns it on.

Or run it in the ContextStream web app, signed in with your ContextStream account. Version 0.1.0 · Updated

What does Memory Gardener do?

Finds duplicate or conflicting decisions and lessons, and stale todos, plans, tasks and reminders, and proposes merges, supersedes and closures for the person to accept.

What it declines

It does one job. A task like one of these is declined with a reason:

  • Changing, merging or closing anything itself: every change is a proposal the person accepts or turns down.
  • Writing new decisions, lessons, todos or notes.
  • Summarising or explaining what the workspace remembers.
  • Judging whether a decision was a good one.

What can Memory Gardener access, and is it safe to turn on?

Memory Gardener gets a short-lived token for one workspace that lets it do only this: read the workspace's plans, tasks, todos and reminders; read the workspace's decisions and lessons; propose merges and closures that only you can accept; and call models through ContextStream's model proxy, within a cap set for the run. It works in one project, only for that run, and declines any task outside its job. The only things Memory Gardener may change are these: it may propose merges and closures that only you can accept. A workspace owner or admin turns it on.

Model agent. A program on ContextStream's model proxy, with a short-lived token that acts for you in one workspace. It is stopped after 5 min. You may schedule it to run on its own.

ScopeWhat it lets a run do
items.readRead the workspace's plans, tasks, todos and reminders
memory.readRead the workspace's decisions and lessons
memory.proposePropose merges and closures that only you can accept
model.invokeCall models through ContextStream's model proxy, within a cap set for the run

How is Memory Gardener tested?

Memory Gardener is checked on 12 cases, each with a known right answer: workspaces with seeded duplicate or conflicting decisions and lessons and stale open items, and requests outside its job it must decline. A case passes only if the run ends the way the case expects, declining what is not its job, and every check holds: every proposal is one of the seeded ones and every seeded one is proposed, it changes nothing itself and only files proposals, and what it says it filed is what ContextStream received. The workspaces and the model's replies are fixed test data, so the cases check which items it picks and how the model's verdicts are held to its rules, not the live model's own judgement. Version 0.1.0 passes all 12.

It is a program on general-purpose models, reached through ContextStream's model proxy, not a trained model. Its prompts are versioned and tuned against these tests, and a change that misses the quality bar fails them.

What does a real run of Memory Gardener look like?

The input, the result (shortened where it is long), how long it took and where it ran. Live runs used public or demo material only; a run marked as from its test suite is not a live run.

Live run on ContextStream

Duplicate decisions about a public repository, as a dry run

Version
0.1.0
Outcome
succeeded
Ran
2026-10-27 17:26 UTC
Took
18.9 s

ContextStream's Demos workspace, in the project for the public mcp-server repository: its decisions about indexing, plus four demo decisions written for this example (two pairs that repeat or contradict each other).

What it ran on

  • Decisions in the Demos workspace's mcp-server project (demo material)
Input
{
  "project_id": "6aad1065-8086-4114-931e-1b16c1d9b234",
  "kinds": [
    "decisions"
  ],
  "dry_run": true,
  "focus": "search decisions"
}

Result

Summary

Drafted 4 merges, 0 supersedes, 0 closures from 8 candidates across 14 decisions, 0 lessons, 0 open todos, 0 open plans, 0 open tasks and 0 open reminders. The workspace's decisions contain several near-duplicate statements about detached project indexing and case-insensitive search, plus one same-day contradiction about case sensitivity that needs the person's judgment.

Proposals (a dry run: nothing was filed or changed)

ProposalItemsWhySure
merge“Show related-project search hits with paths relative to their repository” and “Search results from another project use repository-relative paths”D4 and D5 both say search hits from a related project are shown with repository-relative paths; D5 adds that this is not the machine path it was indexed from, so it says it more completely.0.9
merge“Exhaustive search always matches without regard to case” and “Exhaustive search ignores case”D1 and D2 both state that exhaustive search ignores case and give the same FooBar/foobar example; D2 states it in full, so D1 repeats it.0.9
merge“Run project indexing in a detached child to keep setup responsive.” and “Keep setup responsive by starting project indexing in a detached child”Both decisions say project indexing runs in a detached child so setup stays responsive; D13 records the implementation details (startBackgroundIndexing, unref), so it says it more completely.0.85
merge“Keep project indexing detached from setup completion.” and “Do not make setup await project indexing; keep indexing detached and asynchronous.”D9 and D10 both say setup must not wait for project indexing and that indexing stays detached; D10 states it more completely.0.85
Checks: 4 of 4 passed
  • items_read: Read 14 decisions, 0 lessons, 0 open todos, 0 open plans, 0 open tasks and 0 open reminders.
  • verdicts: Every verdict fits its candidate; 0 unsure changes left alone.
  • proposals_filed: A dry run: nothing was filed.
  • no_direct_writes: Changed nothing itself: every change waits for the person to accept it.
Task
2d3861ea-7367-4397-8577-aef6687368c3

Which tools does Memory Gardener work with?

Claude Code, Codex, Cursor and other MCP clients: ContextStream's MCP gives them an agents tool that finds, runs and follows Memory Gardener. It also runs from a terminal or an agent's shell with csa run gardener, and from the ContextStream web app.

  • Claude Code, Codex, Cursor and other MCP clients: connect ContextStream's MCP once (setup for each editor), then ask your agent to hand the job to Memory Gardener.
  • A terminal or an agent's shell: csa run gardener, installed with ContextStream's command line.
  • The web app: the workspace's agent library.

How do I turn Memory Gardener on?

An owner or admin of your ContextStream workspace turns Memory Gardener on in the web app's agent library. Agents are opening workspace by workspace; if yours is not open yet, the library says so.

  1. Sign in to ContextStream: the button below opens the agent library on Memory Gardener.
  2. An owner or admin switches Memory Gardener on for the workspace.
  3. Pick the project it works in, and run it from the library, from your coding agent or with csa run.

How do I call Memory Gardener from Claude Code or Codex?

Ask your coding agent to hand the job to Memory Gardener, or call it yourself: csa run gardener in a terminal, or agents(action="run", agent="gardener", input={...}) over MCP.

Connect ContextStream's MCP (it also writes each editor's connection):

curl -fsSL https://contextstream.io/scripts/mcp.sh | bash

The weekly pass: every kind of item, stale after 60 days. Over MCP:

agents(action="run", agent="gardener", input={})

In a terminal (curl -fsSL https://contextstream.io/cs/install.sh | sh installs csa):

csa run gardener

Input

FieldTypeWhat it is
kinds"decisions" | "lessons" | "todos" | "plans" | "tasks" | "reminders"[]What to tend. Defaults to all of them.
project_idstringTend only this project's items.
stale_after_daysintegerHow long past its due date an open item must be to look stale (an item with no due date: twice as long untouched). Defaults to 60.
focusstringA topic to tend first, for example "deployment decisions".
dry_runbooleanList the proposals without filing them.
as_ofstringJudge staleness as of this time instead of now.

What does Memory Gardener cost?

Memory Gardener costs 400 ContextStream credits a run, charged only when the run succeeds; a declined, failed, cancelled or timed-out run costs nothing. Credits come with every plan: Starter is free with 10,000 a month (25 runs of Memory Gardener, if spent on nothing else), and Pro is $19 a month with 25,000.

A run starts only once its price is accepted. Over MCP, a call without accepted_price_credits returns the price first; csa asks on a terminal, and scripts pass --yes.

Workspace

Lens

screenshot and image explainer agent

Lens explains an image a person shared: what it shows, the text in it, what in their workspace it relates to, and what to do next, with citations.

Checked on 6 test cases with known answers: all 6 passv0.2.0
Workspace

Plans & Tasks Keeper

plans and tasks status agent

Plans & Tasks Keeper answers one question about the status of the workspace's plans and tasks, citing their ids.

Tested on 106 real-world questions with the live model: all 106 passed: right plan, every cited fact checked against the data, and out-of-scope questions declinedv0.2.0

Every ContextStream agent