Developer builds tool to preserve AI coding agent reasoning across sessions
A developer discovered that their AI coding agent, Claude Code, proposed re-adding a database column that had previously been reverted due to PCI-DSS compliance concerns — because the agent had no memory of the earlier decision. The incident highlighted a broader problem: while code changes persist, the reasoning behind them is lost when an AI session ends. To address this, the developer built Selvedge, a local MCP server that instructs AI agents to log their reasoning in real time before and after making changes. Selvedge stores decision history in a local SQLite file with no telemetry or external network calls, and supports export and import via the open Agent Trace format backed by Cursor and Cognition AI. The tool is available as an open-source Python package and is designed to give developers a persistent 'why' behind AI-assisted code changes, even after the original session is gone.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in