# Selvedge 0.3.19 review: decision memory for coding agents

URL: https://techaiwire.com/articles/selvedge-0-3-19-review-decision-memory-coding-agents-tested/

_By Claire Whitmore - Nov 22, 2026_

**By the numbers:**

- 0 - internet connections in 9 traced operations, Tech AI Wire test
- 8 - MCP tools the server lists
- 6 ms - to recall a saved decision over MCP in the test
- 26 - GitHub stars on November 22, 2026

Selvedge 0.3.19, released on November 19, 2026, gives AI coding agents a local notebook for decisions. It stores why a change was made and which approaches were rejected. In a Tech AI Wire test it worked with the network switched off and never contacted a server. Its lookups, though, only matched the exact name a decision was saved under.

A coding agent such as Claude Code starts each session with no memory of the last one. It can spend an hour finding out again that a cache broke the logout flow. Selvedge is an attempt to fix that. Mason Delan maintains it under the MIT license, and the [GitHub repository](https://github.com/masondelan/selvedge) had 26 stars on November 22.

## How Selvedge works

Selvedge keeps its records in SQLite, a database that lives in one file. The README puts that file at `.selvedge/selvedge.db` inside the project. Each record is tied to an "entity", a named piece of the code such as a function, a database column or a route.

Agents reach it through MCP, the Model Context Protocol, a standard way for an AI tool to call outside programs. The [MCP specification](https://modelcontextprotocol.io/specification/2026-07-28/basic/transports/stdio) says the client starts a local server as a subprocess. The two then trade JSON messages over standard input and output. The README lists eight tools. Two matter most. `log_change` saves a decision, and `prior_attempts` is the one an agent is told to call before it edits something.

The project is plain about its limits. "Only explicitly saved decisions can be recalled," the README says. It adds that Selvedge cannot guarantee an agent will consult it. PyPI, Python's package index, marks the package as alpha software. Its first release there is dated April 22, 2026.

## Tech AI Wire test: Selvedge 0.3.19 in Docker

The maintainer suggested Selvedge to Tech AI Wire by email. Nothing was paid, and the test used the public PyPI release. It ran on macOS 26 with Docker 28.4.0 on an Apple silicon Mac, in a `python:3.13-slim` container. Running `pip install selvedge==0.3.19` brought in 33 other packages.

The main claim held up. One container, started with `--network none`, saved a rejected caching idea. A second container opened the same folder and got the reason back.

![Terminal output from the test: a rejected caching decision is saved in one offline container and recalled in a second one.](/images/covers/2026/11/selvedge-0-3-19-review-decision-memory-coding-agents-tested/body-1.jpg)

*Image: Tech AI Wire test*

The same worked over MCP. A short client script started `selvedge-server`, listed its eight tools and saved a record in 8 ms. A fresh server process returned an earlier record through `prior_attempts` in 6 ms. Starting the server and connecting took about 230 ms.

The README says core storage and retrieval "make no LLM calls". To check for any network use, the test ran nine operations with the network on. It traced them with `strace`, a tool that logs what a program asks of the operating system. The nine covered saving, searching, health checks and two MCP sessions. None opened an internet connection. `selvedge telemetry status` reported telemetry as disabled by default.

## Where the lookups fall short

Recall depended on exact names. The table shows what `prior-attempts` returned after one rejection was saved for `src/cache.py::get_user`.

| Lookup | Result |
|---|---|
| `src/cache.py::get_user`, the saved path | Found, with the reason |
| `src/cache.py::get_users`, one letter more | Nothing, even with `--all` |
| `--description "memoize the user lookup"` | Nothing |
| A `revert` saved with no earlier change | Nothing, even with `--all` |
| A `modify`, then a `revert` | Found, with both reasons |

Row four is the one to watch. The record was stored, and `selvedge blame` and `selvedge search` both showed it. But the lookup an agent runs before editing returned an empty list. An empty answer also exits with code 0, so "never tried" and "saved under another name" look the same. PyPI lists an optional `semantic` extra, about 30 MB, that matches by meaning. This test did not install it.

The store can also be edited by hand. Release notes for version 0.3.11 describe a SHA-256 hash chain, a running fingerprint of the records. After a direct SQLite edit, `selvedge verify` failed its `chain_intact` check and exited with code 1. The lookup command still served the edited text with no warning.

![Terminal output from the test: selvedge verify fails after a record is edited in SQLite, but the lookup still returns the edited text.](/images/covers/2026/11/selvedge-0-3-19-review-decision-memory-coding-agents-tested/body-2.jpg)

*Image: Tech AI Wire test*

## What this means for developers

Selvedge is low risk to try on private code, because nothing left the machine in this test. The quickstart installs it with `uv tool install --upgrade selvedge`, or with pip inside a virtual environment. Then `selvedge setup` wires it to an agent. There are presets for Claude Code, Codex, Copilot in VS Code, Cursor, Gemini CLI and Windsurf.

For Claude Code, the [MCP documentation](https://code.claude.com/docs/en/mcp) gives the form `claude mcp add <name> -- <command>`. A project-scoped server is saved in `.mcp.json`, so a team can share it through git. Those docs also say to verify a server is trusted before connecting it. Tech AI Wire's guide to [Claude Code permissions](/articles/claude-code-permissions-explained/) covers how tool approvals work.

The test points to a few habits that make the tool more useful:

- Agree on one naming style for entities, such as `path/file.py::function`. Put it in the agent's instructions.
- Log the change first and the revert second. Use `reject` for an idea that was never built.
- Run `selvedge verify` in CI when the store is committed to git. Lookups do not check the hash chain.
- Read the records now and then. A wrong reason is recalled as faithfully as a right one.

How much it helps depends on the agent logging its decisions every time. Selvedge's own pilot covered 24 synthetic trials, per the 0.3.16 release notes, and the project limits its conclusion to those tasks. Treat it as a notebook the agent must be told to use.

## Sources

- [masondelan/selvedge: persistent decision memory for AI agents](https://github.com/masondelan/selvedge) - GitHub
- [Selvedge quickstart](https://selvedge.sh/start/quickstart/) - Selvedge
- [selvedge on PyPI](https://pypi.org/project/selvedge/) - PyPI
- [Selvedge releases](https://github.com/masondelan/selvedge/releases) - GitHub
- [Model Context Protocol specification: stdio transport](https://modelcontextprotocol.io/specification/2026-07-28/basic/transports/stdio) - Model Context Protocol
- [Connect Claude Code to tools via MCP](https://code.claude.com/docs/en/mcp) - Claude Code Docs
