Repository navigation
Description
Problem
Remember currently targets Claude Code only. The plugin exposes only a
.claude-plugin manifest, its hooks rely on Claude-specific environment and
session metadata, and the summarization path invokes claude -p.
OpenAI Codex now supports plugins, hooks, persistent interactive sessions,
resuming sessions by ID, and repository/user-scoped skills. Codex users cannot
install Remember as a working Codex plugin or use the same layered daily-log,
handoff, consolidation, worktree-sharing, and optional backup workflow.
Proposed solution
Add official Codex support while keeping the existing memory format and
pipeline host-neutral:
- provide a
.codex-plugin/plugin.jsonmanifest and make the DPT marketplace
exposeremember@dpt-pluginstocodex plugin add; - map Codex lifecycle events to the existing session-start, prompt/turn, tool,
and session-end pipeline boundaries; - derive project, worktree, session, and transcript identity from Codex-native
metadata rather thanCLAUDE_*variables; - summarize without requiring an authenticated Claude CLI, using a Codex-native
execution path or a documented provider adapter; - preserve the current git-common-dir behavior so all worktrees of one
repository share one memory store; - add contract tests covering install, recall, save, resume, worktrees, and
concurrent Codex sessions.
The same installed plugin should remain safe when Claude Code and Codex use the
same external Remember store on one machine.
Alternatives considered
- Codex native memories: useful and already available, but they do not
expose Remember's layered daily logs, explicit/rememberworkflow,
consolidation pipeline, worktree identity, or optional Git backup contract. - A local compatibility wrapper: could translate Codex sessions into the
current scripts, but it would duplicate host integration outside the project
and drift from Remember releases. - Installing the current Claude plugin in Codex: the Codex marketplace does
not currently discover it as an available plugin, and the implementation
still depends on Claude-specific hooks, environment variables, transcript
assumptions, andclaude -p.
Additional context
Codex documents stable plugin marketplace commands and stable interactive
session resume support. Its local session JSONL includes a durable session ID,
working directory, and turn lifecycle events, which appear sufficient for an
adapter without changing Remember's stored memory schema.
Activity
fdaviddpt commentedon Aug 28, 2026
Thanks for the detailed write-up. I checked the premise against OpenAI's own docs rather than taking it from the issue, and it holds — with one correction that makes this considerably smaller than proposed, and two problems the issue understates.
What I verified
Confirmed against Package your plugin and Hooks:
.codex-plugin/plugin.jsonis the manifest, and a plugin may bundleskills/,hooks/hooks.json, and.mcp.json. Marketplaces register viacodex plugin marketplace add owner/repo, catalogued in.agents/plugins/marketplace.json.SessionStart,SessionEnd,UserPromptSubmit,PreToolUse,PostToolUse,PermissionRequest,PreCompact,PostCompact,SubagentStart,SubagentStop,Stop— the same names Remember already binds.SessionStartstdin carriessession_id,cwd,transcript_path, andsourcewith valuesstartup/resume/clear/compact.SessionEndcarriessession_id,cwd,transcript_path,reason.codex exec, with--jsonemitting a JSONL event stream, andcodex exec resume <SESSION_ID>.The correction
Codex exposes
CLAUDE_PLUGIN_ROOTandCLAUDE_PLUGIN_DATAto hook processes as explicit compatibility aliases. That retires one of the two large numbers in this repo on its own: 223 of the ~560CLAUDE_*references areCLAUDE_PLUGIN_ROOT, and they need no change at all.The remaining 273 are
CLAUDE_PROJECT_DIR, which is not in the compatibility list — but they are not 273 sites of work either. It is read from the environment in exactly one place,scripts/resolve-paths.sh:121, and re-exported at line 195; everything downstream consumes the already-resolvedPROJECT_DIR. Codex suppliescwdon hook stdin, so this is one fallback branch in one file.So the host coupling is three seams, not a rewrite:
scripts/resolve-paths.sh:121. Add a stdin-cwdfallback beneath theCLAUDE_PROJECT_DIRbranch.pipeline/extract.py:_session_dir()reconstructs<config>/projects/<slug>/<session_id>.jsonl. Codex keeps flat rollout files under~/.codex/sessions/and, more usefully, hands the exact path over astranscript_path. Remember's hooks do not currently read that field on either host. Consuming it where it is offered and keeping reconstruction as the fallback is a strict improvement for Claude Code too, independent of this issue.pipeline/haiku.pyshellsclaude -p.codex execis the counterpart.What the issue understates
The summarizer is the hard part, and contract tests will not catch it failing. Swapping
claude -pforcodex execis a small diff. Validating it is not: every prompt underprompts/was tuned against one model's behaviour, and the consolidation output is prose, not a schema. A test suite covering "install, recall, save, resume, worktrees, concurrent sessions" passes green while the summaries quietly become useless. Whatever this turns into needs a way to judge summary quality, not just pipeline liveness.Two hosts sharing one store is a new concurrency contract.
lib-lock.shandlib-staging-lock.shexist, but they were written against a single host's session model and its assumptions about session-ID shape and lifecycle ordering. "Safe when Claude Code and Codex use the same store" is the sentence in this issue that carries the most unproven weight, and it deserves its own issue with its own tests rather than a bullet in a larger one.Suggested split
Seams 1 and 2 are worth landing on their own merit — reading
transcript_pathwhen the host offers it is a correctness improvement for the current host. I would rather ship those as ordinary refactors than as Codex scaffolding, so they get reviewed on what they do rather than on a roadmap.cwdandtranscript_pathfrom hook stdin; keep today's derivation as fallback. Host-neutral, no Codex dependency.claude -pas the only implementation. Pure refactor.codex execprovider + a means of judging summary quality. The real work..codex-plugin/plugin.json, marketplace entry, lifecycle wiring. Small once A–C land.Accepted in principle, scoped as above. If you want to take any of these, A is self-contained and a good first one.
fdaviddpt commentedon Aug 28, 2026
Follow-up, because a third host changes the shape of this.
Gemini CLI
Gemini CLI also ships hooks — default-on since v0.26.0 — with extensions declared in
gemini-extension.json, hooks bundled athooks/hooks.json, andgemini extensions install <github-url|path>. Sources: hooks, hooks reference, extension reference.Its event names do not follow Claude's:
BeforeTool,AfterTool,BeforeAgent,AfterAgent,BeforeModel,AfterModel,BeforeToolSelection,PreCompress,Notification, alongsideSessionStartandSessionEnd. Codex copying Claude's vocabulary was a deliberate compatibility choice, not an emerging industry convention.But the stdin payload is the same in all three:
{"session_id", "transcript_path", "cwd", "hook_event_name", "timestamp"}SessionStart.sourceisstartup|resume|clear— Codex addscompact.SessionEnd.reasonisexit|clear|logout|prompt_input_exit|other, richer than Codex's always-other.And Gemini documents no environment variables for command hooks. No plugin root, no project dir, no compatibility alias.
What that changes
The
CLAUDE_PLUGIN_ROOTalias I leaned on above is worth less than I implied. It is a courtesy Codex chose to extend and can withdraw in any release, and on the third host there is no equivalent to extend. The env-var route is the parochial one; the stdin contract is the part three vendors arrived at independently.So the portable seam is not something this project needs to invent. It already exists, and Remember already touches it:
session-start-hook.sh:124capturesHOOK_STDINand_stdin_json_string()at line 144 extractssession_id(#206) andsource(#339) from it. Two fields of a payload carrying four we want.That is now #407, filed on its own merits rather than as Codex scaffolding — reading a path the host handed us beats reconstructing it on Claude Code today, and the Windows slug history in #263 is the evidence.
It also sharpens what remains here. Remember is far less Claude-coupled at the hook boundary than this issue's framing suggests: the resolver reads each env var at exactly one site, and the transcript path is offered to us and ignored. The coupling that is real, and that no shared contract dissolves, is
pipeline/haiku.pyshellingclaude -p. Three CLIs means three auth models, three output shapes, and three sets of prose behaviour that every prompt underprompts/was tuned against. Still the hard part, and still not something to abstract from one implementation.Scope of this issue now
Keeping this as the Codex epic rather than sharding it — B, C and D below have no justification that does not point back here, and E cannot be started until C lands:
codex execprovider, plus a way to judge summary quality. A green contract suite passes while summaries quietly become useless..codex-plugin/plugin.json, marketplace entry, lifecycle wiring.Gemini support is not proposed here and is not planned. It is in this comment as evidence about which seam is portable, nothing more.
feat: Codex plugin manifest, marketplace entry, and hooks binding (#410…
fdaviddpt commentedon Sep 1, 2026
Closing this: B, C and D landed in v0.24.0, and the two things that were left over are now on the board as their own issues rather than as unfinished bullets inside a closed epic.
Against the split in my second comment, verified at f3232bd on 2026-09-01
cwdandtranscript_pathfrom hook stdin. Landed -- it was split out as Read cwd and transcript_path from hook stdin instead of deriving them #407 and shipped, withtests/test_codex_hook_transcript_465.py,tests/test_codex_transcript_path_459.pyandtests/test_codex_stdin_session_id_468.pybehind it.pipeline/haiku.pynow has_resolve_summarizer_provider/_choose_summarizer_providerover_call_codexand the Claude path, withREMEMBER_SUMMARIZERas the selector andautodeciding from the host signature.codex execprovider. The provider half landed, verified against codex-cli 0.150.1. The other half did not -- see below..codex-plugin/plugin.json, marketplace entry, lifecycle wiring. Landed, pinned bytests/test_codex_manifest_410.py.The two carve-outs
#492 -- C shipped without the means of judging summary quality that this issue said had to come with it. The 10 tests in
tests/test_summarizer_routing_460.pyare all about routing and liveness; the only assertion made about what a summary says is that it is non-empty. That is the failure this issue predicted in as many words, so it is filed rather than left as a bullet.#491 -- "safe when Claude Code and Codex share one store" is still the unproven sentence.
scripts/lib-lock.shandscripts/lib-staging-lock.shcontain neither the stringcodexnorhost, and no test puts two hosts against one store. My comment said to promote this the moment C merged, on the grounds that it is the thing most likely to get skipped; C merged, so here it is.Gemini CLI is still not proposed and not planned. #456 tracks it separately as its own request.
@Krzysztof318 -- thanks for the write-up. Your premise held up against the vendor docs; what changed was the size, and the stdin contract you pointed at turned out to be the portable seam for the whole thing.
Add a live, on-demand summary-quality harness for the codex exec prov…