---
digest: >
  v0.39.3 is a patch release of three pull requests by Rodrigo Immaginario. On a Windows
  package install, npm's global `mirror` and `mirror-hook` are shell shims, and the plugin's
  hook wrappers and MCP locator handed them to Node: no Claude Code conversation was ever
  logged there, and the MCP server died on arrival. They now run the package's own bin
  (PR #53). `runtime diagnose` no longer counts its own "attention needed" exit as a
  front-door error, so the finding stops feeding itself (PR #50, CR139). The docs point a
  Windows reader to the installer that now lives in its own repository (PR #54). No
  migration, and no model or prompt change.
---

# v0.39.3 — Windows Gets Its Hooks

**Date:** 2026-11-03

## Highlights

- **Claude Code hooks and the MCP server work on a Windows package install**
  ([PR #53](https://github.com/mirror-mind-ai/mirror/pull/53), by @rodrigoimmaginario). On
  Windows npm writes no symlink: its global `mirror-hook` and `mirror` are POSIX shell
  shims with `node_modules/` beside them. Handed to Node, the shim ran as JavaScript:
  every hook ended `node exited 1` in `hooks.log`, and the MCP server died with a
  `SyntaxError` from the shim's second line. The wrappers and the locator now run the bin
  the shim wraps, one fixed path away, when it is there. A POSIX prefix is unchanged.
- **`runtime diagnose` no longer counts its own verdict as a front-door error**
  ([PR #50](https://github.com/mirror-mind-ai/mirror/pull/50), by @rodrigoimmaginario;
  [CR139](../project/refinement/rs010-cv22-oracle-and-port-hygiene/cr139-a-verdict-that-exits-1-is-logged-as-a-front-door-error.md)).
  Its exit 1 means "attention needed", a contract with scripts, and the front door logged
  it as `ERROR`, which `front_door_errors` then counted: one more error per run, a finding
  that could never clear. The exit is now logged at `INFO` as a verdict; a real failure of
  the same command stays `ERROR`.
- **A Windows reader is pointed to the installer**
  ([PR #54](https://github.com/mirror-mind-ai/mirror/pull/54), by @rodrigoimmaginario):
  [mirror-mind-ai/mirror-installer](https://github.com/mirror-mind-ai/mirror-installer), a
  per-user installer in its own repository, from README, Getting Started, and REFERENCE's
  platform envelope. The envelope itself is unchanged: this repository ships no Windows
  product, and POSIX is what is supported.
- No migration, and no model or prompt change.

## Where We Started

v0.39.2 shipped the morning's Windows fixes: `runtime diagnose` reading the PATH the
platform's way, and PowerShell's marks and encodings on stdin. Three of Rodrigo's PRs
remained, and the largest of them was the one that mattered most: on a Windows package
install, Mirror's Claude Code integration had never worked, and nothing said so but
`hooks.log`.

The diagnose loop in PR #50 had been in the backlog three times over, CR127, CR139, and
CR176, the last two captured without finding the first. The PR implements CR139's first
option as written, arrived at independently. CR139 is done with Rodrigo as its Driver;
CR127 and CR176 are closed as its duplicates.

## What Changed

**The shim rule, in the two generators.** `scripts/generate_hook_wrappers.sh` and
`MCP_LOCATOR` in `ts/src/guards/claudePlugin.ts` each gain one rule: when
`<dir of the entry>/node_modules/mirror-mind/bin/<entry>.js` exists, that is the entry.
The twelve wrappers and manifests are regenerated from it, and regenerating on the merge
leaves the tree unchanged. A hook test models the Windows prefix on POSIX with a fake
Node that records the entry it was handed; a maintainer commit added the locator's
run-as-written case, which fails on the previous locator.

**The verdict, beside the command.** `isRuntimeVerdict` in `runtimeRoute.ts` says which
exit is an answer; the dispatcher asks it. A maintainer commit moved the rule there from
the dispatcher, and made the end-to-end test's finding sure on purpose (`loose_permissions`
by `chmod`), since v0.39.1's Node search no longer guarantees the one the test had relied
on.

## Conscious Exclusions

- Windows is not a supported platform of this repository: CI runs the suite on macOS and
  Ubuntu, and the Windows job runs two files. The installer repository pins the core it
  tests against. Whether that changes is a later decision.
- The front-door log's `route=usage` lines still count as errors (CR139's second option,
  not taken). On the maintainer's home every such line comes from the test suite:
  [CR195](../project/refinement/rs010-cv22-oracle-and-port-hygiene/cr195-the-test-suite-writes-four-lines-into-the-real-home-s-front-door-log.md),
  captured.
- One macOS CI run on PR #54 failed in the updater smoke's package lane with a bare exit
  1 and passed on re-run. Noted; not yet understood.

## Upgrading

```bash
mirror runtime update
```

On Windows, the installer at mirror-mind-ai/mirror-installer pins the core version it
ships; this release is the one its Claude Code hooks need.

## Next Horizon

Alan Nascimento's PR #51 (the stop hook losing a reply) and Moacir Moda's PR #27; CR190,
CR192, and CR195 in RS010's backlog. CV24 continues on its branch.
