mem_save
Save observations, decisions, and discoveries to persistent memory that AI coding agents recall when relevant. Organize memories by type and scope for precise retrieval.
Instructions
Save an observation to persistent memory. Without session_id, uses a stable manual-save session for the detected project.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | One of: bugfix, decision, policy, architecture, discovery, pattern, config, preference. The category is a search filter, so a word outside this list is a memory that filtering never returns — a real store collected `implementation`, `feature` and `manual` that way. Close synonyms are folded on the way in; anything else is kept verbatim. | manual |
| scope | No | Memory scope: project, personal, or global. A label for filtering later — a personal memory still belongs to this project and reads narrowed to another one will not return it. | project |
| title | Yes | Short searchable title. | |
| content | No | Full observation content. | |
| project | No | Project owning this observation. Accepted only when it matches the detected project, the process override, or a project the store knows. | |
| tool_name | No | Name of the tool that produced the observation. | |
| topic_key | No | Stable key used to revise an evolving observation instead of inserting another. | |
| session_id | No | Session identifier. Defaults to manual-save-{project}. | |
| observation | No | Backward-compatible alias for content. | |
| capture_prompt | No | Link this memory to the question it answers: the prompt this process last recorded, else the session's last one, else — only when no session_id is given — the project's last from the past 30 minutes. Defaults to true. Pass false for automated saves that answer no user request. | |
| recovery_token | No | Short-lived token returned by an ambiguous_project error. Required with project_choice_reason. | |
| project_choice_reason | No | Must be user_selected_after_ambiguous_project, and only after the user picked one of available_projects from an ambiguous_project error. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hint | No | Said when a summary was saved without a name anybody could find it by. | |
| status | No | ||
| project | No | ||
| candidates | No | ||
| judgment_id | No | ||
| observation | No | ||
| project_path | No | Where the project lives, when the answer came from a directory. | |
| project_source | No | ||
| judgment_status | No | ||
| judgment_required | No |