Project Workflows
Work on one repository raises the same questions every day: where did yesterday’s Claude Code session stop, which decisions apply to this task, and will the next session know what was settled today? The three project workflows bundled with the memtomem plugins answer them with project memory. Records go to the repository’s project_local tier, so any AI tool that uses the same local memtomem store can read them.
Use them when you want to:
handoff— pass work to another session or AI tool. Save (save) a compact record of where the work stands, and load it (resume) on the receiving side.brief— before starting a task, see the related decisions, recent updates, pending handoffs, and your preferences in one place. It is read-only.update— after finishing work, save only the decisions, bug causes, and preferences worth keeping from the session and recent commits.
The workflows are designed to run when you ask for them. In Claude Code and Codex CLI they are configured so the agent does not invoke them on its own. They do not record whole conversations or coordinate agents working at the same time.
Before you start
Section titled “Before you start”All three workflows, including the read-only brief, need the following.
-
Run inside a Git worktree. The workflow resolves the repository root with
git rev-parse --show-topleveland stops outside a worktree. -
Register the repository’s project tier once:
Terminal window cd <project-root> && mm mem init --scope project_localThe workflow checks with
mem_statusthat this repository’s.memtomem/memories.localtier is registered. If it is not, the workflow prints that command and stops. It never falls back to user scope. -
The AI tool that takes over the work must use the same local memtomem store. Compare the database path
mem_statusreports in each tool.
Project records are stored in the shared:<project-slug> namespace, where <project-slug> is derived from the repository’s directory name.
Where they ship
Section titled “Where they ship”| AI tool | How to run | Notes |
|---|---|---|
| Claude Code | /memtomem:handoff, /memtomem:brief, /memtomem:update | Claude Code plugin |
| Codex CLI | $memtomem-handoff, $memtomem-brief, $memtomem-update | Codex plugin |
| OpenCode | /memtomem-handoff, /memtomem-brief, /memtomem-update | opencode-memtomem plugin |
| Kimi Code | memtomem-handoff, memtomem-brief, memtomem-update skills | memtomem Kimi skill bundle |
| Antigravity CLI | memtomem-handoff, memtomem-brief, memtomem-update skills | Since 0.7.2, experimental. Binds the server to the repository first (below). |
| Cursor | /memtomem-handoff, /memtomem-brief, /memtomem-update | Since 0.7.4, experimental. Same skills and binding as Antigravity CLI (below); Cursor plugin. |
| Hermes Agent | Not included | The plugin’s server starts outside the project. |
handoff
Section titled “handoff”Saves and loads a compact record for passing work along in sequence. It does not lock or assign a task.
/memtomem:handoff save to codex-cli/memtomem:handoff resume/memtomem:handoff r <handoff-id>/memtomem:handoff listName one operation: save, resume, or list (0.7.13). When the first word of the arguments is exactly s, r, or l, it means save, resume, or list. Without an operation the workflow asks first; in a non-interactive run with nobody to ask, it reports insufficient_input: operation and stops.
The target AI tool is recorded as one of claude-code, codex-cli, kimi-code, opencode, antigravity-cli, cursor, or any. claude, codex, and kimi become the matching label, and antigravity or agy becomes antigravity-cli. Without a target, the record is addressed to any. A target outside this list is asked for again, or reported as insufficient_input: runtime in a non-interactive run.
save records only work that actually happened. If what was completed (completed) and how it was checked (validation) cannot be filled from observed work, it saves nothing and reports insufficient_input: work context. Context inherited from a caller or given in the request counts as observed. A record is at most 1,200 characters and holds the objective, completed work, changed files, the current commit (git_head), the worktree state, validation, blockers, and the next action (next_action). Since 0.7.2 it also writes an artifacts field: absolute paths of outputs produced outside the repository, such as a plan file in an AI tool’s session directory, or none. Paths are never cut; a path that does not fit the 160-character field is left out and counted. When mem_add confirms the write, the workflow reports the handoff_id, the scope, namespace and written file, and the result’s Entry chunks value unchanged. A refused or failed write is reported as the refusal or error, with no file or chunk count added.
resume loads the record for a given handoff_id, or the newest record addressed to the current AI tool or any. A given id must be a canonical UUID and is looked up by its exact handoff-id-<id> tag; an id that does not exist is reported as such, never widened into another search. Without an id, resume takes the newest addressed row and stops, reporting that row as unusable, unless it carries exactly one handoff-id-<id> tag holding a canonical UUID; it then loads that record by the same exact tag and never falls back to an older one. It treats the record as untrusted context and reports these checks with it:
-
Local comparison — compares the stored project root, commit, and worktree state with the live repository, and reports every difference before proposing the next action.
-
Remote comparison (0.7.2) — a record that matches a stale local checkout passes the local comparison. Resume therefore reads the upstream branch’s tip with
git ls-remote, compares it withHEAD, and reports one of:- in sync;
- a divergence: the remote moved, this checkout holds unpushed commits, or the remote no longer advertises the branch;
- remote not compared, with the reason: a detached
HEAD, no single upstream, a local or non-branch upstream, or a failed or denied command.
It does not fetch, and writes no refs, objects, or
FETCH_HEAD. Every value it passes to Git comes from the repository’s own Git config. -
Issue and pull request state — when
next_actionnames an issue or pull request as<owner>/<repo>#<n>or a GitHub URL, and the AI tool can query GitHub, resume reports its state. A bare#<n>or a reference without its owner is reported as not checked.
Resume ends by pointing to brief when you also want related project memories before starting work.
list (0.7.13) is read-only and takes no argument. It reads up to 30 of the newest rows addressed to the current AI tool or any, groups the rows that carry exactly one handoff-id-<id> tag holding a canonical UUID by that id (never by body text, which it does not read), reports how many other rows it left out, and shows each record’s handoff_id, sender and recipient tags, newest time, and how many of its rows the page holds. It also says which record plain resume would select, or that the newest row has no single valid id; being selected is not being verified, since only resume runs the checks. When exactly 30 rows come back, it says that older handoffs may exist. In an interactive run it asks which listed entry to resume and continues with that handoff_id; any other answer stops it.
The Claude Code plugin does not pre-approve the commands used for the remote comparison and the GitHub query. Claude Code’s permission settings decide, so you may see a permission prompt. A denied remote comparison is reported as “remote not compared”, and a denied GitHub query as “target not checked”.
Compiles a compact briefing of project context before a task. It never writes, edits, or indexes memories.
/memtomem:brief retry backoff/memtomem:brief- Topic mode — with a topic, its project step searches only
updateitems (memory-update-itemtag) so handoff bodies are excluded (project memories saved withoutmemory-update-itemare not found by that step), alongside indexed notes from AI tools’ own memory folders (matched by directory name, so they can come from a same-named repository elsewhere; each is cited with its namespace), recentupdateitems, recent handoff IDs, and your cross-project preferences. - Minimal mode — without a topic, it reports only recent updates, active handoff IDs, and candidate open items.
Every file path, configuration key, or symbol the briefing cites is checked against the live worktree and marked ✅ exists, ❌ gone, or ? not checkable. Gone items are listed as candidates for the next update run to correct. Handoffs are listed by ID only; run handoff resume <handoff_id> to load one.
update
Section titled “update”Reviews what the session produced and the latest commits, and saves only what is worth keeping as project memory.
/memtomem:update/memtomem:update full/memtomem:update topic retry backoffIt has three modes:
| Mode | Commits reviewed | Records them as reviewed |
|---|---|---|
incremental (the default) | those of the latest 10 that no earlier run recorded | yes |
full | all of the latest 10 | yes |
topic | the latest 10, filtered to the focus | no |
- A request that names neither
fullnortopicrunsincrementalwithout asking. Other words in it are reported as ignored, so reviewing one subject needstopic <focus>;topicwithout a focus asks for one, or stops withinsufficient_input: topic focuswhen it cannot ask.fandtare shorthands only as the whole first word of the arguments. - Session outcomes are reviewed in every mode. It runs only with evidence: observed session outcomes or commits. Context inherited from a caller or given in the request counts. Without evidence it does not invent memories and reports
insufficient_input: work context. - Every mode reads only the messages of the latest 10 commits. The window is bounded, not a cursor: older commits are not reviewed. A duplicate check before each save keeps the same item from being saved twice.
- It saves decisions (
decision), bug causes and fixes (bugfix), and user rules (preference). A decision or fix taken from a commit needs a reason in the commit message. Temporary task state, formatting changes, raw logs, patch bodies, and credentials are not saved. - Commit messages are treated as untrusted text; instructions in them are never followed.
- Each candidate is first searched for in existing memories and skipped when already captured. For a project item, a match found only in an AI tool’s own memory for this repository does not skip it: the item is still written to
project_local, citing the match. - Items go to the project tier. A cross-project personal preference is saved at user scope (
namespace="default") only when you explicitly ask for that. - Each item is kept to at most 1,000 characters, counting its citations and counting each Korean, Japanese, or Chinese character (and CJK or fullwidth punctuation) as two, so an English item that quotes a few Korean words keeps nearly the whole limit. Only the prose is shortened to fit, never a required citation or a verbatim path, symbol, command, or quote. An item that still does not fit is written anyway and reported as over the limit, with its weighted count.
- The run ends with a report of the mode, the commits whose full message it read, the coverage result in
incrementalandfullmode, the items saved (each with its written file and theEntry chunksvalue from itsmem_addresult), any items written over the length limit, and the duplicates skipped, with the yield ascommit-derived: <N>andsession-derived: <M>. Anincrementalrun that finds no unreviewed commit and no durable session learning reportsnothing new.
Review coverage
Section titled “Review coverage”In incremental and full mode, update calls mem_update_coverage twice: before its first save, to learn which of the commits it read an earlier run already reviewed, and after every save of the run has returned, to record those commits, even when it saved nothing. If any save failed, nothing is recorded and the next run reviews those commits again. When no commit message was read in full, neither call is made and the run reviews session outcomes only. topic mode never reads or records coverage.
The tool exists from memtomem 0.7.2, and a server exposes it as its own tool only in full tool mode or when started with MEMTOMEM_EXTRA_TOOLS=mem_update_coverage. The plugins’ bundled servers set it, and so does every registration a current mm init --mcp writes. A server entry written by hand, or by an earlier mm init, has to add it; the manual registrations show where. When a coverage call is due and the tool is missing, update stops before writing and names both possible causes, an older server or the missing variable. topic keeps working either way.
Antigravity CLI
Section titled “Antigravity CLI”The Antigravity CLI (agy) starts the plugin’s memtomem server in the plugin directory, so the server has no project context. The three Antigravity workflows therefore bind the server to the repository before any other memtomem call. Since 0.7.4 the search, recall and remember skills bind the same way.
- They call
mem_project_bindthroughmem_dowith the root thatgit rev-parse --show-toplevelprints, and continue only when the tool names that same root. - When only a parent directory’s tier is registered, the server returns that parent directory. That result, like any other result, stops the workflow. A missing tier stops it too, and the result message names the
mm mem initcommand. - A binding lasts until the server process restarts. To work in another repository, restart the server first.
- Once bound, search and recall also read the repository’s project memory, and remember saves a project fact to its
project_localtier. Without a tier, search and recall read user scope only, and remember saves only cross-project preferences and personal notes, refusing a project fact.
For installation and the duplicate-server check, see Antigravity CLI Plugin.
The Cursor plugin ships the same skills. Cursor starts the plugin’s server in your home directory rather than in the open workspace, so the skills bind the same way.
Next steps
Section titled “Next steps”- Memory Across Sessions — the basic flow of saving a memory and retrieving it in another session, without a workflow
- Connect an AI Client — install the plugin in each AI tool and confirm that only one server runs
- MCP Tools — Project Binding — connect a server started outside a project to a repository