`prepare` is undefined because A ≠ B.Package name, version, and bytes cannot make two local Symbol values equal.

Prove physical identity.

Profile anchorlocal realpath

Find direct and nested copies installed with the plugin.

Host anchorinstallation realpath

Resolve the core closure that owns Agent and ToolRuntime.

Expectedone canonical file

Symlink aliases are fine only when they canonicalize together.

Restore Host ownership.

Preserve

manifest, lockfile, patch, paths

Recreate

pnpm, autoInstallPeers false

Resolve

one physical core closure

Probe

native + MCP + restart

Do not fix identity with optional chaining.

Skipping an absent scheduler silently converts every tool into incorrect Agent behavior.

Keep the complete recovery runbook.

The canonical guide includes two-anchor resolution, transactional reinstall, misleading fixes, boot invariant design, and eleven regression gates.

Read the complete guide