Skip to content

setup-hooks --platform=codex does not copy _memoryFiltering.js, so session-start fails with MODULE_NOT_FOUND #547

@rendigua

Description

@rendigua

Summary

After a fresh official Codex install flow, the generated session-start hook fails immediately because _memoryFiltering.js is required but not copied into .codex/hooks/.

Environment

  • OS: Windows
  • Host: Codex
  • package: @evomap/evolver@1.87.0
  • install path: global npm install

What I did

  1. npm uninstall -g @evomap/evolver
  2. npm cache clean --force
  3. npm install -g @evomap/evolver@1.87.0 --prefer-online --no-audit
  4. In a fresh git repo, ran:
evolver setup-hooks --platform=codex
  1. Ran the generated hook directly:
node .codex/hooks/evolver-session-start.js

Actual behavior

It fails with:

Error: Cannot find module './_memoryFiltering'

Why this happens

The generated evolver-session-start.js contains:

const { filterRelevantOutcomes } = require('./_memoryFiltering');

but setup-hooks --platform=codex only copied these files into .codex/hooks/ in my fresh install:

  • _runtimePaths.js
  • evolver-session-start.js
  • evolver-signal-detect.js
  • evolver-session-end.js

So the default generated hook cannot run successfully.

Expected behavior

Either:

  1. _memoryFiltering.js should also be copied alongside the generated hooks, or
  2. evolver-session-start.js should not require a local helper file that is not installed with the hook set.

Notes

This was reproduced on a clean official-path setup without local source patching or manual file injection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions