#4244·claude-mem

[Windows][Codex Desktop] claude-mem 13.28.0 hooks exit with code 1 and Codex sessions are not captured in viewer

Author: aethyronCreated Sep 26, 2026Updated Sep 26, 2026
Labelsbug

Summary

On Windows, claude-mem's Codex integration repeatedly fails plugin hooks with exit code 1 during normal Codex Desktop usage.

The problem was originally reproduced on claude-mem 13.26.0.

I have now updated to claude-mem 13.28.0 and the same failures still occur.

There is a second related symptom:

The claude-mem local viewer at:

http://127.0.0.1:37777

shows my Claude Code history normally, but does not show my Codex history/sessions.

Disabling claude-mem in Codex removes the hook errors.

This makes the Codex integration itself the common factor.


Environment

  • OS: Windows
  • claude-mem: 13.28.0
  • Previously reproduced on: 13.26.0
  • Codex Desktop runtime observed during initial diagnostics: 0.158.0-alpha.2
  • Codex Desktop package: 26.924.1866.0
  • Standalone Codex CLI on PATH: 0.154.0
  • Node: v26.8.2
  • Bun: 1.4.2
  • Claude Code was also configured with claude-mem
  • claude-mem worker/viewer: http://127.0.0.1:37777

Platform: Windows.


Installation / update history

I initially reproduced the issue on claude-mem 13.26.0.

I then performed a fresh installation for both:

  • Claude Code
  • Codex CLI

The installer completed successfully, including:

  • plugin files copied;
  • plugin cached;
  • dependencies installed;
  • Claude Code plugin registered;
  • Codex hooks marketplace registered;
  • worker started successfully.

I subsequently updated to:

claude-mem 13.28.0

The Codex hook failures still persist on 13.28.0.

So upgrading from 13.26.0 to 13.28.0 did not resolve the problem.


Codex Hook Stats behavior

During normal Codex Desktop usage, Hook Stats repeatedly shows entries like:

Failed — PreToolUse — Plugin
hook exited with code 1

and:

Failed — PostToolUse — Plugin
hook exited with code 1

There are also UserPromptSubmit — Plugin failures with exit code 1, although that event has more than one plugin registered in my environment and I cannot conclusively attribute every UserPromptSubmit failure to claude-mem.

For PreToolUse and PostToolUse, however, the installed hook inventory identified the claude-mem hooks as:

PreToolUse:
claude-mem file-context

and:

PostToolUse:
claude-mem observation

These repeatedly failed with:

hook exited with code 1

while surrounding project hooks completed successfully.


Viewer / capture symptom

The claude-mem worker and web viewer are running.

Opening:

http://127.0.0.1:37777

shows my Claude Code history / memory activity.

However, Codex sessions/history do not appear there even after working normally in Codex.

Therefore I currently observe:

Claude Code
→ claude-mem history visible

Codex Desktop
→ claude-mem history absent
→ claude-mem plugin hooks repeatedly fail

I do not know whether the missing Codex history is:

  1. a separate viewer/source-filter problem;

or, more likely,

  1. a consequence of the Codex hooks failing before activity can be captured.

I am reporting it as a related symptom rather than claiming a separate UI root cause.


A/B test

I disabled the claude-mem plugin in Codex and then continued normal Codex work.

Result:

claude-mem enabled
→ repeated Plugin hook failures

claude-mem disabled
→ those hook failures disappear

Other tooling continued operating.

This strongly isolates the visible hook failures to the claude-mem Codex integration.


Expected behavior

With claude-mem enabled for Codex:

  1. PreToolUse / PostToolUse hooks should complete successfully or fail open without generating repeated code-1 failures.
  2. Codex activity should be captured by claude-mem.
  3. Codex sessions/history should become available to claude-mem and visible alongside Claude Code activity where supported.
  4. Normal Codex usage should not populate Hook Stats with repeated plugin failures.

Actual behavior

With claude-mem enabled:

PreToolUse Plugin
→ exit code 1

PostToolUse Plugin
→ exit code 1

These failures repeat during normal Codex usage.

Codex sessions/history also do not appear in the claude-mem local viewer.

Disabling claude-mem removes the hook errors.

The behavior persisted after upgrading:

13.26.0 → affected
13.28.0 → still affected

Previous read-only diagnostic findings

Before upgrading, I performed a read-only investigation of the active claude-mem installation.

It found:

  • the claude-mem worker was alive and healthy at the time of the Codex failures;
  • ordinary worker-unavailable/missing-input handler paths did not match exit code 1;
  • claude-mem's Codex hook launcher used a nested process-launch path;
  • the launcher had an exit-code-1 path when the nested process could not be started;
  • a safe diagnostic test reproduced nested spawnSync failures with EPERM inside the Codex tool sandbox;
  • the equivalent Node spawn succeeded outside that sandbox.

However:

I do not consider spawnSync EPERM a confirmed root cause.

The original failing Hook Stats entries did not expose their stderr/source details by the time this was investigated.

This is only a diagnostic lead.


Possibly relevant area

The failure appears related to the Windows/Codex host integration rather than the shared worker itself.

It may overlap with the existing Codex/Windows integration work such as:

  • Codex host hook compatibility;
  • Windows-specific Codex hook execution;
  • hook launcher/spawn behavior;
  • fail-open hook handling.

But this report is specifically a current reproduction on claude-mem 13.28.0.


Steps to reproduce

  1. Use Windows.
  2. Install/update claude-mem 13.28.0.
  3. Enable its Codex integration.
  4. Start Codex Desktop.
  5. Open a project.
  6. Send a normal coding prompt which causes Codex to use tools.
  7. Open Codex Hook Stats.
  8. Observe repeated Plugin failures such as:
PreToolUse — Failed — hook exited with code 1
PostToolUse — Failed — hook exited with code 1
  1. Continue working in Codex.
  2. Open the claude-mem viewer:
http://127.0.0.1:37777
  1. Claude Code activity is visible, but Codex history is absent.

  2. Disable claude-mem in Codex.

  3. Continue working.

The repeated plugin hook errors disappear.


Workaround

Currently my workaround is:

Claude Code:
claude-mem enabled

Codex:
claude-mem disabled

This avoids the repeated Codex hook errors but means I lose claude-mem integration/history for Codex.


Additional evidence available

I can provide:

  • a screenshot of Codex Hook Stats showing the failed Plugin hooks;
  • claude-mem logs;
  • Codex Desktop logs;
  • current claude-mem 13.28.0 hook configuration;
  • screenshots of the claude-mem viewer showing Claude Code history but no Codex history.

If there is a specific diagnostic command that would capture the hook's stderr/source path without modifying the installation, I can run it.