---
digest: >
  v0.39.5 is a patch release of one Change Request, CR192, from PR #47's thread with
  Rodrigo Immaginario. The hook wrappers, the plugin's MCP entry, and `runtime diagnose`
  now use `MIRROR_NODE` only when it is an absolute path to an executable file, the rule
  the Pi extension has followed since v0.39.1. A relative value could make a hook run a
  file from the project the runtime was opened in, and a value that no longer pointed at
  Node was dropped without a word. Now neither is used, and the hooks and the MCP entry
  name the refused value with its reason. The Windows installer's drive-letter path counts
  as absolute, proven in CI under Git Bash and on the installer itself. No schema change,
  no migration, and no model or prompt change.
---

# v0.39.5 — The Node You Named, or Why Not

**Date:** 2026-11-05

## Highlights

- **A relative `MIRROR_NODE` is never run**
  ([CR192](../project/refinement/rs010-cv22-oracle-and-port-hygiene/cr192-the-hook-wrappers-and-the-mcp-locator-accept-a-relative-mirror-node.md)).
  A runtime starts its hooks and its MCP server from the project it was opened in, and the
  hook wrappers and the MCP entry kept any `MIRROR_NODE` that passed `[ -x ]` there: with
  `MIRROR_NODE=bin/node`, the project's own `bin/node` ran on every hook. Every reader now
  follows the Pi extension's rule: an absolute path to an executable file, or nothing.
- **A value that is not used is named, with its reason.** A value that named no usable
  Node used to be dropped without a word. Now the hook wrappers write
  `MIRROR_NODE=bin/node is relative; searching the PATH and the usual places instead` to
  `<mirror home>/hooks.log`, once a UTC day for the same value, and the MCP entry writes
  the same message to its stderr. The reasons are the Pi extension's: `relative`,
  `a directory`, `missing`, and `not executable`. The search then goes on through the
  PATH and the usual places, as before.
- **The Windows installer's form counts as absolute.** Under Git Bash the installer's
  `MIRROR_NODE` is a drive-letter path with backslashes, and a POSIX-only test would have
  refused it on every Windows hook; @rodrigoimmaginario named that trap before the plan
  was written. One shell pattern now classifies exactly as Node's `path.win32.isAbsolute`:
  `C:\…`, `C:/…`, and `\\server\share\…` are absolute, and a drive-relative `C:node.exe`
  is refused as `relative`.
- **Proven on Windows twice.** The Windows CI job runs a real wrapper under Git Bash, with
  a Node under `Program Files\nodejs` named in its Windows form. And before this tag,
  Rodrigo ran the installer against `main`: its `MIRROR_NODE`, under a user folder with a
  space and accents, ran the hooks and the MCP server with no refusal line, and
  `C:node.exe` gave exactly one.
- No schema change, no migration, and no model or prompt change.

## Where We Started

v0.39.1 made the Pi extension strict about `MIRROR_NODE`
([CR191](../project/refinement/rs010-cv22-oracle-and-port-hygiene/cr191-the-pi-extension-cannot-find-node-where-the-hook-wrappers-can.md)):
an absolute path to an executable file, or a warning with the reason and a search without
it. The rest of the family was not strict. The hook wrappers and the plugin's MCP locator
kept any value that passed `[ -x ]`, a test a relative path passes against the project a
hook was started in; a value that failed it was dropped, and whoever had set it to pin a
Node learned nothing. `REFERENCE.md` described one trust class for every reader, and only
one reader held to it. CR191's debt review left the family's rule as its own decision,
captured as CR192 on 2026-11-02.

On PR #47 the next day, Rodrigo Immaginario named the trap in the obvious fix: under Git
Bash the Windows installer's `MIRROR_NODE` is a drive-letter path, it passes `[ -x ]`
today, and a `/*` test for "absolute" would refuse it, so every hook on a Windows install
would log a refusal. He also asked that PR #53, which changed the same generator, locator,
and tests, merge first. It did, in v0.39.3, and the plan started from its blocks.

## What Changed

**One rule, one pattern.** For the shell readers, "absolute" is one `case` pattern,
`/*|\\*|[A-Za-z]:[\\/]*`, which matched `path.win32.isAbsolute` on 15 values in bash,
dash, ksh, `/bin/sh`, and zsh as `sh`. `scripts/generate_hook_wrappers.sh` gives it, with
the logging helpers and the Node search, to all three wrapper forms as shared fragments,
and the 13 wrappers are regenerated. The MCP locator in `ts/src/guards/claudePlugin.ts`
carries the same text as `ABSOLUTE_PATH_CASE`, and a test fails if the two drift. The Node
readers keep their platform's `path.isAbsolute`, so on Windows every reader draws the same
line.

**A refusal that cannot forge a line.** Line breaks are removed from a value before it is
logged: in review, a value with a line break in it wrote a second `hooks.log` line, as
`claude:stop`, that `runtime diagnose` counted. The locator prints with `printf`, because
dash's `echo` turns the `\n` of a Windows path into a newline, and names `$MIRROR_NODE`
once, because Grok pastes a set variable's value into the MCP arguments it loads.

**`runtime diagnose`.** Its Node check counts `MIRROR_NODE` only under the rule, through
`isExecutableFile()`, which the front door's runtime route now shares. It adds no finding
of its own: the hooks' refusal line reaches it as `hook_failures_recorded`, for seven
days.

**Tests and CI.** `mirrorNodeRule.test.ts` holds the pattern equal across the three
wrapper forms and the locator, runs the classification table through bash and, where
installed, dash, and runs a real wrapper with a Node under `Program Files/nodejs` and
with `C:node.exe`; the Windows job runs it under Git Bash. `hooks.test.ts` and
`mcpEntry.test.ts` cover each reason, a planted `bin/node` that never runs, the daily
rule across two fixed days, a forged line break, and a server that starts past a
relative value.

**Docs.** The rule is stated once, in full, in the
[configuration reference](../reference/configuration.md#hook-node-resolution);
`REFERENCE.md`'s row points there. Troubleshooting shows the refusal line and the fix, and
says `runtime diagnose` keeps counting old lines for seven days after the fix.

Validated by the Navigator in a scratch home: two runs of the plugin's prompt hook with
`MIRROR_NODE=bin/node` wrote one line,

```text
2026-11-04T21:40:16Z claude:user-prompt: MIRROR_NODE=bin/node is relative; searching the PATH and the usual places instead
```

the project's `bin/node` never ran, the prompt was logged, and `runtime diagnose`
reported `hook_failures_recorded`. CI passed on every job, the Git Bash step included,
and Rodrigo's installer run, 21 of 21 on the installer's contract, was the gate before
the tag.

**Also in this release.** Troubleshooting's PowerShell 5.1 section, from Rodrigo's PR #49
run: `Get-Content` decodes an editor-saved UTF-8 file without a mark through the ANSI code
page before the pipe runs, so a UTF-8 `$OutputEncoding` alone does not save it. The pipe
route now adds `Get-Content -Encoding UTF8`, and `--file` stays the safe one.

## Conscious Exclusions

- `MIRROR_BIN` keeps its behavior: a relative value is still honored, and one that names
  nothing is still dropped without a word.
  [CR197](../project/refinement/rs010-cv22-oracle-and-port-hygiene/cr197-the-hook-wrappers-and-the-mcp-locator-accept-a-relative-mirror-bin.md)
  (captured) would give it this rule, keeping accepted the forward-slash `C:/…` form a
  Windows machine sets for the Claude Code forwarders.
- `runtime diagnose` does not name a refused value. It counts the hooks' line under
  `hook_failures_recorded`, and the value and its reason are in `hooks.log`; Rodrigo
  suggests saying it in diagnose too. A finding of its own was left out at planning.
- Whitespace: the Pi extension trims the value and the shell readers do not, so
  ` /opt/node` is accepted by Pi and refused as `relative` by the hooks. Nothing writes
  such a value.
- Converting MSYS `/c/…` values, and rotating `hooks.log`.
- Where Codex and Antigravity show an MCP server's stderr is not verified; the docs say
  only what each CLI's own help shows.

## Upgrading

```bash
mirror runtime update
```

If you set `MIRROR_NODE` by hand, make it the absolute path of the `node` binary: a
relative one is now refused, with one line a day in `hooks.log`.

## Next Horizon

CR197, which would bring `MIRROR_BIN` under this rule with its pattern; Rodrigo's
suggestion that `runtime diagnose` name a refused value, not yet decided; and the open
RS010 backlog.
