From 1f530fa6895071eef24dbd233e598049de18f76b Mon Sep 17 00:00:00 2001 From: Riz Ashraf Date: Sat, 19 Sep 2026 05:49:51 +0100 Subject: [PATCH] Revert "docs: Remove graceful shutdown instructions" This reverts commit a996e7152b2181c66ece707e4312de07c992bd04. --- instructions.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/instructions.md b/instructions.md index 10195c5..cdfda3b 100644 --- a/instructions.md +++ b/instructions.md @@ -105,6 +105,12 @@ To maintain absolute traceability, we link memory items directly to the exact gi - **Fully Automated (git2):** You no longer need to manually execute `git rev-parse HEAD` or pass `git_branch` / `git_commit` arguments. - When you call tools like **log_code_change**, **log_error_fix**, or **log_tech_debt**, the Rust server uses the native `git2` crate to automatically discover the repository context of the active working directory, extract the current HEAD commit hash, message, and branch, and permanently bind them to the memory item in the background. +## 13. Server Lifecycle & Updates (Graceful Shutdown) +When instructed to restart, update, or stop the mcp-memory-server binary, never use brute-force OS kill commands (e.g. Stop-Process, pkill, kill). +- Why: The server uses asynchronous checkpointing. Force-killing it bypasses the shutdown flush, risking data loss in the master JSON graph, and can lead to lingering file locks. +- How: Always use the built-in graceful shutdown mechanisms: + 1. CLI Flag: mcp-memory-server --exit (or --restart) + 2. HTTP Endpoint: POST http://127.0.0.1:3000/shutdown ## 15. Neovim Integration & God Mode The project contains two MCP binaries (win-nvim and linux-nvim) that bridge JSON-RPC over stdio directly to the active Neovim instance (using ctive_nvim.txt for Last Focused Wins telemetry).