v0.2.20
Release Notes for v0.2.20
This release is a full overhaul of memanto connect: agent instructions and the memanto-memory skill were rewritten and are now version-stamped, so Memanto can tell when an installed integration is stale and update it in place. Connect gained a real hook system, session-start and pre-compact memory sync plus readable in-chat summaries of memory operations for Claude Code, Codex CLI, and Cursor and instruction file paths are now resolved separately for local and global installs across all 14 supported agents. Alongside it are Windows-specific fixes to template rewriting and the Connections UI.
New Features
- Versioned agent instructions with update detection (
memanto/cli/connect/updater.py,memanto/cli/connect/templates.py)- Instruction files and
SKILL.mdnow carry a<!-- memanto-template-version: X.Y.Z -->stamp, seeded atTEMPLATE_VERSION = 1.0.0. - New
check_for_updates()scans every registered agent, locally and globally, and reports the lowest installed version; a file carrying the legacy<!-- MEMANTO-MANAGED-SECTION -->marker with no version tag is treated as0.0.0. memanto statusandmemanto memory syncnow print a non-fatal notice when any installed integration is behind the shipped version.
- Instruction files and
memanto connect update(memanto/cli/commands/connect.py,memanto/cli/connect/updater.py)- Re-installs the latest instructions and skill for every active integration, local and global, in one command, with deduplicated per-agent status output and an error summary if any agent fails.
- Hook installation for Claude Code, Codex CLI, and Cursor (
memanto/cli/connect/assets/hooks/,memanto/cli/connect/engine.py,memanto/cli/connect/agent_registry.py)- Hook definitions now ship as JSON assets (
hooks.json,codex-hooks.json,cursor-hooks.json) plus two Python scripts copied into the agent'shooks/directory at connect time;${CLAUDE_PLUGIN_ROOT},${PLUGIN_ROOT}, and${CLAUDE_PROJECT_DIR}are substituted with real paths on install. session_start.pyrefreshesMEMORY.mdon session start and resume, and prints a one-line context notice that Claude Code folds into the session.notify.pyruns as aPostToolUsehook gated onBash(memanto *)and replaces the raw shell line in chat with a readable summary (👾 Memanto · stored a decision (confidence 0.95)); it stays silent on anything it cannot confidently describe.- Both scripts are registered under
pythonandpython3and use a temp-file claim lock, so the duplicate registration needed for cross-platform coverage never produces duplicate output. - Codex CLI and Cursor gained
supports_hooks=Truewith session-start and pre-compact sync entries; Claude Code additionally gets aPreCompactsync so context about to be summarized away is persisted first.
- Hook definitions now ship as JSON assets (
- Instruction update banner in the web UI (
memanto/app/ui/routes/ui_router.py,memanto/app/ui/static/index.html,sdks/typescript/openapi.json)- New endpoints
GET /api/ui/template-status,GET /api/ui/template-status/dismissed,POST /api/ui/template-status/dismiss, andPOST /api/ui/template-status/update. - The dashboard shows a dismissible banner when instructions are outdated, with an Update Now button that runs the same local+global update as the CLI. Dismissal is stored per version in
cli.dismissed_template_version, so the banner returns when a newer version ships.
- New endpoints
Improvements
- Rewritten agent instructions and
memanto-memoryskill (memanto/cli/connect/templates.py)- Instructions are now organized as five numbered directives (environment-aware execution protocol, abstraction rule, durability test, recall trigger matrix, execution reference) instead of the previous rule list.
- Adds an explicit anti-pattern rule: store the generalized principle ("Exclusively use functional components for React UI"), not the chat log ("User told me to use functional components").
- Native CLI and integrated-IDE agents are instructed to run the memory evaluation in a
<thinking>block; VS Code Copilot and extension-mode agents, which have no thinking block, are given a three-step sequence that writes the evaluation into theexplanationparameter of a no-op terminal call. SKILL.mdgains a full command reference (includingedit,forget, and the temporalrecallvariants), per-type default provenance, and worked workflow examples;get_skill_content()now takes the agent name and substitutes it into every--source <agent_name>example.
- Separate local and global instruction paths per agent (
memanto/cli/connect/agent_registry.py,memanto/cli/connect/engine.py)AgentDef.instruction_fileis replaced byinstruction_local_fileandinstruction_global_file, and global paths are declared explicitly per agent (~/.claude/CLAUDE.md,~/.codex/AGENTS.md,~/.pi/agent/AGENTS.md,~/.config/opencode/AGENTS.md,~/.codeium/windsurf/.windsurfrules, and others) rather than derived by stripping the local config directory.- GitHub Copilot's global target resolves to the platform VS Code user prompts directory (
%APPDATA%\Code\User\prompts\on Windows,~/Library/Application Support/Code/User/prompts/on macOS,~/.config/Code/User/prompts/on Linux).
- **Copilot instructions get aut
Bug Fixes
- Template rewrites corrupted content containing backslashes (
memanto/cli/connect/engine.py)_write_dedicated_file()and_inject_into_file()passed template content straight intore.sub()as the replacement string, where\is an escape character — Windows paths and other literal backslashes were mangled or raised a bad-escape error. Replacement text is now backslash-escaped before substitution.
- Reinstalling instructions wiped synced dynamic memories (
memanto/cli/connect/engine.py,memanto/cli/connect/templates.py)- A new
<!-- MEMANTO-DYNAMIC-MEMORIES -->block sits outside the managed static section, and_strip_dynamic_block()removes it from the incoming content before rewriting, so an update or re-connect replaces only the static instructions and leaves memories synced into the file intact._remove_instructions()strips both blocks on disconnect.
- A new
- Disconnect button broke on Windows project paths (
memanto/app/ui/static/index.html)- The project path was HTML-escaped but not JS-escaped before being interpolated into an inline
onclickstring literal, so any path containing\produced a broken handler and the Disconnect/Untrack button did nothing. Backslashes and single quotes are now escaped for the JavaScript string context.
- The project path was HTML-escaped but not JS-escaped before being interpolated into an inline
- Hook removal only handled
SessionStartand exact payload matches (memanto/cli/connect/engine.py)_remove_hooks()compared against the registry's hardcoded payload, so hooks installed from the JSON assets — and anything underPostToolUseorPreCompact— were left behind on disconnect. Removal now sweeps every hook event, drops any group containing a Memanto command (memanto,notify.py, orsession_start.py), prunes emptied events, and deletes the copied hook scripts and their directory. Note that a group is removed as a unit: an unrelated hook sharing a group with a Memanto hook is removed with it.
- Global instruction paths resolved incorrectly for several agents (
memanto/cli/connect/agent_registry.py)resolve_instruction_file()previously built global paths by stripping the local config directory prefix from the local filename, which produced wrong targets for agents whose global layout differs from their local one. It now uses the declared global path directly, handling absolute,~/-prefixed, and bare-relative forms.
Tests
tests/test_connect_engine.py— updated hook-removal assertions for the new sweep behavior; removed the case asserting that non-Memanto hooks sharing a group with a Memanto hook survive disconnect.tests/test_connect_detection.py— updated for theinstruction_file→instruction_local_filerename.
Full Changelog
Full Changelog: v0.2.19...v0.2.20