save_memory
Record decisions, bug fixes, discoveries, and user preferences for future sessions. Use stable topic keys to update existing memories and keep a local markdown backup.
Instructions
Save a memory for future sessions. MUST be called after: (1) architecture decisions — record what was chosen, why, and what was rejected, (2) bug fixes with root cause — record symptom, root cause, fix, and prevention, (3) important discoveries — record finding and its implications, (4) user preferences — record preference and reasoning. Use topic_key for cross-session dedup (same project+topic_key updates existing memory). By default also writes a local markdown backup.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | No | Optional host identifier, e.g. codex-cli, claude-code, api, cli. | |
| text | Yes | Memory text content | |
| files | No | List of related file paths | |
| scope | No | Memory scope: 'project' (default, only this project) or 'global' (visible in all projects). Use 'global' only for explicitly cross-project preferences or knowledge. | |
| title | No | Optional title | |
| branch | No | Git branch label. If omitted, the server auto-detects from the MCP process current working directory. Pass an explicit value to override (e.g. when the calling agent is not running inside the project's git checkout). | |
| project | No | Project name | |
| topic_key | No | Stable topic identifier for cross-session dedup. Same project+topic_key updates existing memory instead of creating new one. Format: kebab-case descriptive key, e.g. 'fts5-search-strategy', 'auth-middleware-design'. | |
| local_path | No | Optional local markdown path for backup copy. Relative paths are resolved from current working directory. The resolved path must fall within the remem data directory (REMEM_DATA_DIR); paths outside that boundary are rejected. | |
| session_id | No | Optional host session id. When provided, Stop summary promotion can suppress exact duplicate candidates from the same session. | |
| memory_type | No | Memory type: decision, discovery, bugfix, architecture, preference. Defaults to 'discovery'. | |
| claim_source | No | Optional claim source label. Defaults to manual_save for MCP calls. | |
| claim_enabled | No | Override the session claim toggle. Defaults to true; set false to preserve legacy save behavior without claim rows. | |
| created_at_epoch | No | Optional override for the memory's creation timestamp (Unix epoch seconds). Use only for backfilling historical entries; defaults to now when omitted. | |
| local_copy_enabled | No | Override the local markdown backup toggle. Default behavior (when omitted) is controlled by the server config. | |
| acknowledge_pattern | No | Explicitly acknowledge an instruction-pattern match in direct save text after human review. Must match the detected pattern id, e.g. override_previous_instructions. | |
| reference_time_epoch | No | Explicit episode/source event time (Unix epoch seconds) used to resolve relative dates. Preferred for historical backfills; created_at_epoch is used only when this is omitted. |