@@ -11,9 +11,10 @@ verification, decision capture, and resumable checkpoints.
1111
1212- ** Orient from memory.** The ` bm-orient ` skill reads active tasks, open
1313 decisions, and recent Codex checkpoints before substantial work.
14- - ** Checkpoint work.** The ` bm-checkpoint ` skill and ` PreCompact ` hook write
15- general ` codex_session ` notes or schema-backed ` coding_session ` notes with
16- structured repository and pull-request context.
14+ - ** Checkpoint work.** ` PreCompact ` records a private request and the ` Stop `
15+ hook asks the active Codex turn to run ` bm-checkpoint ` once after compaction.
16+ The resulting ` codex_session ` or ` coding_session ` note is agent-authored from
17+ the compacted working context, with repository and pull-request evidence.
1718- ** Capture decisions.** The ` bm-decide ` skill records durable engineering
1819 decisions with rationale, alternatives, and consequences.
1920- ** Remember lightly.** The ` bm-remember ` skill saves small facts without turning
@@ -32,16 +33,18 @@ verification, decision capture, and resumable checkpoints.
3233| --- | --- |
3334| ` .codex-plugin/plugin.json ` | Codex plugin manifest |
3435| ` .mcp.json ` | Basic Memory MCP server configuration |
35- | ` hooks/hooks.json ` | SessionStart and PreCompact hook registration |
36+ | ` hooks/hooks.json ` | SessionStart, PreCompact, and Stop hook registration |
3637| ` hooks/session_start.py ` | uv script: runs ` basic-memory hook session-start --harness codex ` |
3738| ` hooks/pre_compact.py ` | uv script: runs ` basic-memory hook pre-compact --harness codex ` |
39+ | ` hooks/stop.py ` | uv script: runs ` basic-memory hook stop --harness codex ` |
3840| ` skills/ ` | Codex-native Basic Memory workflows |
3941| ` schemas/ ` | Seed schemas for Codex sessions, decisions, and tasks |
4042
41- The hook scripts carry no logic: the brief, the checkpoint, and lifecycle-event
42- capture all live in the pinned Basic Memory revision behind ` bm hook ` . Each is
43- a self-contained PEP 723 script pinned to a Basic Memory Git ref. Both refs
44- are updated together with ` just set-codex-hook-version <sha-or-tag> ` .
43+ The hook scripts carry no logic: the brief, checkpoint coordination, and
44+ lifecycle-event capture all live in the pinned Basic Memory revision behind
45+ ` bm hook ` . Each is a self-contained PEP 723 script pinned to a Basic Memory Git
46+ ref. All refs are updated together with
47+ ` just set-codex-hook-version <sha-or-tag> ` .
4548
4649## Requirements
4750
@@ -69,6 +72,13 @@ Plugin installation is user-level in Codex, so one install makes the plugin
6972available across projects on the same machine. Start a new Codex thread after
7073installing so Codex can load the plugin skills, MCP configuration, and hooks.
7174
75+ When adding the marketplace from the Git repository UI, leave ** Sparse paths**
76+ empty. If a sparse checkout is required, include both ` .agents/plugins ` and
77+ ` plugins/codex ` . Selecting only ` plugins/codex ` omits
78+ ` .agents/plugins/marketplace.json ` , so Codex correctly reports that the checked
79+ out marketplace root has no supported manifest. The marketplace file should not
80+ be moved into the plugin directory.
81+
7282Configuration can live at user level in ` ~/.codex/basic-memory.json ` or at
7383project level in ` .codex/basic-memory.json ` . User-level settings are the base;
7484the nearest project file overrides only the keys it declares. ` redactKeys ` and
@@ -103,9 +113,16 @@ Run the setup skill, or create `~/.codex/basic-memory.json` for shared defaults:
103113
104114Codex event capture is on by default. Set the JSON boolean ` false ` at user or
105115project level to opt out; malformed values fail closed. Captured, redacted
106- lifecycle-event envelopes land in a local inbox under your Basic Memory home
107- (` basic-memory hook status ` / ` basic-memory hook flush ` ). Add ` redactKeys ` and
108- ` redactPaths ` arrays to extend the built-in redaction floor.
116+ lifecycle-event envelopes land in a local inbox under your Basic Memory home.
117+ The lifecycle trace stays local: ` basic-memory hook flush ` only moves valid
118+ envelopes into the local retention archive and never creates graph notes. Add
119+ ` redactKeys ` and ` redactPaths ` arrays to extend the built-in redaction floor.
120+
121+ Codex ignores PreCompact stdout, so PreCompact cannot ask the model to write a
122+ note directly. It leaves a private request for the Stop hook. Stop then blocks
123+ the turn once with a request to run ` bm-checkpoint ` ; the active model writes an
124+ agent-authored checkpoint from its compacted context, and the next Stop is a
125+ no-op to prevent loops.
109126
110127When ` captureFolder ` is omitted, Codex resolves the Git top-level directory and
111128writes to ` codex/<repo-dir> ` . An explicit folder still wins.
@@ -125,12 +142,9 @@ identifier in the project file without duplicating the shared settings:
125142The plugin's seed schemas cover notes Codex writes directly: ` codex_session ` ,
126143` coding_session ` , ` decision ` , and ` task ` . Coding sessions require structured
127144repository, repository-root, working-directory, branch, and Git SHA frontmatter;
128- current pull-request fields are added when a PR exists. Optional flush projection
129- also writes normalized ` session ` and ` tool_ledger ` artifacts. Those are
130- core-owned contracts implemented and tested with the projector, not duplicate
131- schema files maintained by each host plugin. ` bm-orient ` and ` bm-status ` still
132- recall normalized ` session ` notes
133- alongside Codex checkpoints.
145+ current pull-request fields are added when a PR exists. Lifecycle envelopes are
146+ operational trace rather than knowledge, so orientation only recalls authored
147+ checkpoint types.
134148
135149Codex plugin hooks must be reviewed and trusted before they run. Open ` /hooks ` in
136150Codex after enabling the plugin and trust the Basic Memory hook definitions.
0 commit comments