You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do not fall back to the system Python or the repository-local `./memory` file. If `memory` is unavailable, install the project into the active virtual environment first.
26
26
27
-
## MemoryOS retrieval
27
+
## Required MemoryOS Lookup
28
28
29
-
At the start of a task, search or load project context when the work may depend on an earlier decision, investigation, error, review, PR, or handoff. Use the installed CLI:
29
+
Before substantive work that changes tracked files, project behavior, configuration, or leads to a Git commit, complete this lookup gate with the installed CLI:
Do not run a memory search by rote before every task. Use it when prior local knowledge is likely to change the work, then rely on the results that are relevant to the current task.
Do not edit tracked files or create a commit until the lookup gate completes. It does not apply to simple read-only commands such as `pwd`, `git status`, or `memory --help`.
43
+
44
+
In commentary, report exactly one outcome: `MemoryOS lookup: found <note title or id>; applying <constraint>.`, `MemoryOS lookup: no relevant records for <terms>.`, or `MemoryOS lookup: unavailable: <reason>.`
37
45
38
46
## Rules
39
47
@@ -46,6 +54,8 @@ Do not run a memory search by rote before every task. Use it when prior local kn
46
54
47
55
## MemoryOS workflow
48
56
57
+
The repository owner authorizes a local-only summary of the current task to the configured MemoryOS home. It must not send data to a network destination or include credentials, secrets, or full private file contents.
58
+
49
59
After every successfully completed task, after checks and before the final response to the user, the agent must update MemoryOS with the installed CLI:
MemoryOS is not built into Codex. Codex follows the instructions in a project's `AGENTS.md`, and those instructions tell it when to search local memory and when to save useful task results.
43
43
44
-
Generate a project-specific instruction file after installing MemoryOS. Use a temporary filename when the project already has `AGENTS.md`, then merge the generated MemoryOS sections into that file. If it has no `AGENTS.md`, rename the generated file to `AGENTS.md`.
44
+
Generate a project-specific instruction file after installing MemoryOS. Use a temporary filename when the project already has `AGENTS.md`, then merge the generated MemoryOS sections into that file. If it has no `AGENTS.md`, rename the generated file to `AGENTS.md`. Projects with an older generated file must regenerate it or manually merge the latest MemoryOS sections.
Make sure the installed `memory` command is available in the environment Codex uses. With these instructions in the project, Codex can search when a task depends on earlier decisions, investigations, errors, or handoff context. It should not run a memory search by rote before every task, and it saves useful experience after completed work.
60
+
Open Codex with the real repository root as its workspace. An `AGENTS.md` in a different folder, copy, or staging workspace is not loaded into that session. Make sure the installed `memory` command is available in the environment Codex uses. With these instructions in the project, Codex performs a required lookup before substantive changes and commits, reports the lookup outcome in commentary, and saves useful experience after completed work.
61
61
62
62
Continue with the [examples](#examples), [CLI reference](CLI.md), [architecture](ARCHITECTURE.md), and [privacy notes](PRIVACY.md) below. The repository contains the engine only; keep your actual memory folder outside it.
- At the start of a task, search or load context when earlier decisions, investigations, errors, reviews, PRs, or handoffs may be relevant.
1613
-
- Use `memory context {project} --session` for a compact handoff, or `memory search "<specific topic>" --project {project}` for a focused question.
1614
-
- Do not run a memory search by rote before every task.
1612
+
Before substantive work that changes tracked files, project behavior, configuration, or leads to a Git commit:
1613
+
1614
+
1. Run `memory context {project} --session`.
1615
+
2. Run `memory search --project {project} --query "<task terms>"`.
1616
+
3. Before creating a commit, also run `memory search --project {project} --query "commit convention release"`.
1617
+
1618
+
Do not edit tracked files or create a commit until the lookup gate completes. It does not apply to simple read-only commands such as `pwd`, `git status`, or `memory --help`.
1619
+
1620
+
In commentary, report exactly one outcome: `MemoryOS lookup: found <note title or id>; applying <constraint>.`, `MemoryOS lookup: no relevant records for <terms>.`, or `MemoryOS lookup: unavailable: <reason>.`
- Do not send private, work, or health data to external APIs automatically.
1626
1632
- Preserve Markdown frontmatter IDs.
1633
+
- The repository owner authorizes a local-only summary of the current task to the configured MemoryOS home. It must not send data to a network destination or include credentials, secrets, or full private file contents.
1627
1634
- After useful completed work, record important decisions, errors, commands, and architecture changes with `memory learn --from-session --actor codex --source codex`.
0 commit comments