published fresh until

Why does Codex reject npm symlinks before plugin hooks run?

Summary Codex 0.164.0 users report plugin hooks failing while fingerprinting npm symlinks. This distinguishes a hook-loading error from a broken executable and explains the limits of reported cache-wrapper workarounds (checked 2026-11-02).

Not for removed CLI flags and permission presets; see codex-cli-0-164-0-retired-flags-presets-migration.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

For Codex's unsupported plugin entry type, inspect the rejected path as a symlink before changing the hook script: users report rejection during plugin fingerprinting, before the hook runs (ChristianWeinrich, openai/codex #56520).

Do first: inspect node_modules/.bin/esbuild -> ../esbuild/bin/esbuild in the reported plugin directory; this uses ChristianWeinrich's link diagnostic (report).

A dependency executable can run independently while the hook still fails to load. There are macOS and Linux reports; the Linux workaround and the narrower macOS checks have different validation limits (ChristianWeinrich, mfbgull, ChrisWeinrich).

Not for: CLI flag and preset migration; see codex-cli-0-164-0-retired-flags-presets-migration.

Diagnostic: unsupported plugin entry type

Affected reports: ChristianWeinrich names Codex CLI 0.164.0, macOS, context-mode 1.0.169, with node_modules/.bin/esbuild -> ../esbuild/bin/esbuild. The target existed and executed during their investigation, but the original cache was no longer available for another live reproduction (October 23).

Mfbgull independently reports CLI 0.164.0 on Ubuntu x86_64, with omo@sisyphuslabs 5.1.40 rejecting .bin/comment-checker. That installation also contained dangling links and links escaping the plugin root; it is broader than the original internal npm shim case (October 25).

Cause and proposed correction

The tagged openai/codex 0.164.0 implementation calls symlink_metadata, handles directories and regular files, and rejects other entry types. This supports the reporters' fingerprinting diagnosis. Their proposed policies include handling internal links while treating dangling and escaping links explicitly; no linked merged correction appears in #56520.

What the workaround reports actually establish

  • mfbgull: reports replacing file links with executable wrappers, directory links with dereferenced copies and deleting dangling links, followed by fingerprinting and approval. They report a stdin-driven hook check and shim execution, and warn that cache updates undo the replacements and that writing through a link can corrupt its target (Linux report).
  • ChrisWeinrich: on macOS with 0.164.0 / context-mode 1.0.169, reports replacing 14 internal file links with wrappers removed the unsupported-entry failure and allowed executable/MCP checks. They explicitly say “Full end-to-end hook execution has not yet been verified” (October 25).

Those are attributed mutation reports, not a universal repair recipe. After identifying the entry type, a separate harmless hook invocation would be needed to establish hook execution; independent executable or MCP checks only establish those components, as the original report cautions (ChristianWeinrich).

Release status: #56520 is open. The CLI 0.166.0 release does not identify this fingerprinting error as resolved. No released fix is established here.

Limits

The first affected CLI release has not been established by bisection. Internal, dangling and root-escaping links require different handling; no universal safe replacement policy is established. The macOS wrapper report stops short of end-to-end hook execution.

Checked 2026-11-02.

Started from a post by @ChristianWeinrich, packaged by the editor. Original post

Subjects

More in agent workflows

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Why does Codex reject npm symlinks before plugin hooks run?
Summary: Codex 0.164.0 users report plugin hooks failing while fingerprinting npm symlinks. This distinguishes a hook-loading error from a broken executable and explains the limits of reported cache-wrapper workarounds (checked 2026-11-02).
Copy for agent
get the whatworks thread codex-plugin-hook-unsupported-entry-type-npm-symlinks and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread codex-plugin-hook-unsupported-entry-type-npm-symlinks
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks