fix(plugins): prompt Codex checkpoints after compaction#1142
fix(plugins): prompt Codex checkpoints after compaction#1142phernandez wants to merge 15 commits into
Conversation
Signed-off-by: phernandez <paul@basicmachines.co>
Signed-off-by: phernandez <paul@basicmachines.co>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5aa5728829
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: phernandez <paul@basicmachines.co>
Signed-off-by: phernandez <paul@basicmachines.co>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 53136dd728
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: phernandez <paul@basicmachines.co>
Signed-off-by: phernandez <paul@basicmachines.co>
Signed-off-by: phernandez <paul@basicmachines.co>
Signed-off-by: phernandez <paul@basicmachines.co>
Signed-off-by: phernandez <paul@basicmachines.co>
Signed-off-by: phernandez <paul@basicmachines.co>
Signed-off-by: phernandez <paul@basicmachines.co>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 911b511589
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: phernandez <paul@basicmachines.co>
Signed-off-by: phernandez <paul@basicmachines.co>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8d1c5509f6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: phernandez <paul@basicmachines.co>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b559421212
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: phernandez <paul@basicmachines.co>
Why
PR #1138 used a PreCompact-to-Stop request handshake so Codex could author
durable checkpoints instead of promoting lifecycle telemetry into graph notes.
A real reinstall showed that request files accumulated while later compactions
produced no checkpoint notes: Stop is not a reliable post-compaction entrypoint.
Codex does provide a deterministic entrypoint after compaction: SessionStart
runs again with the
compacttrigger, and the resumed model has the compactedworking context needed to write a useful handoff. Checkpoints should happen by
default without a plugin-authored security scan second-guessing the model's
Basic Memory write.
What Changed
codex:bm-checkpointfrom post-compaction SessionStart and keepcheckpointOnCompactenabled by default; an explicit JSONfalseopts out.capture and retire Stop coordination. The bundled plugin temporarily keeps
the old Stop shim registered while its scripts remain on the previous
durable runtime, so checkpoints continue during the two-PR pin rollout.
setup, and status skills.
checkpointPrivacyReview,redactKeys, andredactPathsfrom theCodex plugin contract. Ignore the retired privacy-review toggle, while
preserving existing redaction lists only for local lifecycle envelopes.
codex/<repo-dir>, decisions tocodex/decisions, and lightweight memories tocodex/remember.c28159d2077158c4f596fb62f351e6e9012b95a5. After this PR merges, adependency-only follow-up will pin all shims to its durable merge commit and
remove the Stop bridge, matching the established fix(plugins): author Codex checkpoints after compaction #1138/fix(plugins): pin Codex hooks to merged runtime #1140 rollout.
Implementation Details
Codex ignores PreCompact stdout. After compaction,
_session_start()recognizesthe Codex
compacttrigger and prefixes the normal Basic Memory orientationbrief with the deliberate checkpoint instruction. The prompt remains available
when graph orientation is temporarily unavailable.
The checkpoint skill now moves directly from evidence gathering to writing the
durable handoff. There is no optional privacy-review branch and no fail-closed
plugin instruction that can block
write_note. Codex config still merges usersettings followed by project overrides.
checkpointPrivacyReviewis discardedafter resolution. Existing
redactKeysandredactPathslists remain availableonly to the separate local lifecycle-envelope capture path, so removing the
checkpoint gate does not weaken an existing inbox deny rule.
This removal is scoped to the Codex plugin's model-authored checkpoint gate.
Core lifecycle-envelope handling and the separate Claude plugin behavior are
unchanged.
Testing
Automated
BASIC_MEMORY_ENV=test LOGFIRE_IGNORE_NO_CONFIG=1 uv run pytest -q --no-cov plugins/codex/hooks tests/cli/test_hook_command.py tests/test_codex_plugin_package.py— 132 passed.
just fast-check— passed; type checking reported nine existing Python 3.14asyncio deprecation warnings.
just package-check-codex— passed after restoring the durable hook pin.just package-check— passed across Claude Code, Codex, shared skills,Hermes, and OpenClaw; Hermes reported 257 passed / 12 opt-in integration
skips and OpenClaw reported 226 passed.
BASIC_MEMORY_ENV=test LOGFIRE_IGNORE_NO_CONFIG=1 just doctor— passed.git diff --check— passed.git merge-base --is-ancestor c28159d2077158c4f596fb62f351e6e9012b95a5 origin/main— passed.
Risks / Follow-ups
but continues to protect lifecycle envelopes for backward compatibility.
trigger = "compact"; package tests distinguish that event from startup.on disk rather than being deleted during upgrade.
repin before installed marketplace shims execute the new runtime; that
follow-up also removes the temporary Stop bridge.
that repin lands.