memorix icon indicating copy to clipboard operation
memorix copied to clipboard

[memorix-plugin] hook failed in the opencode user input label

Open JackTheMico opened this issue 4 months ago • 2 comments

Image

It just show this error, but I can still typing words and send it to opencode. And the memorix seems work as expected, so it's just a bit of annoying.

memorix doctor output


┌─ Project Identity ─────────────────────────────────
  [OK] Project ID: JackTheMico/dotfiles
  [OK] Name: dotfiles
  [OK] Root: C:\Users\dlwxx\.local\share\chezmoi
  [OK] Git remote: [email protected]:JackTheMico/dotfiles.git
  [OK] Data dir: C:\Users\dlwxx\.memorix\data

┌─ Runtime Mode ─────────────────────────────────────
    Background control plane: not running
    Current invocation: CLI (stdio)

┌─ Embedding / Provider ─────────────────────────────
    Mode: off (BM25 fulltext only)
    Search: fulltext keyword matching

┌─ Data Status ─────────────────────────────────────
  [OK] Observations: 8 total, 8 active
  [OK] Sessions: 0 total, 0 active

┌─ Project Context ─────────────────────────────────
  [WARN] Code memory: no project scan found yet
  [OK] Freshness: 0 current memory link(s)

┌─ Conflict Check ──────────────────────────────────
  [OK] No conflicts detected

┌─ LLM Enhanced Mode ───────────────────────────────
  [OK] Provider: openai/claude-haiku-4-5-20251001
    Capabilities: fact extraction, auto-dedup, LLM rerank

┌─ Auto-Update ─────────────────────────────────────
    Current version: v1.1.9
    Latest known: v1.1.10
    Last check: 20h ago
    Auto-update: enabled (notify only)

┌─ Summary ─────────────────────────────────────────
  [OK] All systems healthy — no issues detected

  Tips:
  [TIP] Start background mode with: memorix background start
  [TIP] Run `memorix codegraph refresh` once to seed project context.

Versions

  • Windows 11, 24H2
  • Opencode 1.17.18
  • memorix 1.1.9

Terminal Environments

  • Winodows Terminal
  • Nushell
  • Herdr

JackTheMico avatar Jul 15 '26 08:07 JackTheMico

Image

An update on the error message.

JackTheMico avatar Jul 16 '26 02:07 JackTheMico

补一个正式版本确认:这个 Windows 问题已经进 1.1.12 了。

根因就是 OpenCode 的 hook 子进程不一定继承 npm 全局 bin 的 PATH,插件以前只写 memorix,所以事件到了以后 handler 可能根本起不来。现在 memorix setup --agent opencode 会在安装时解析并写进实际的 memorix.cmd 路径;默认也不会把失败文字塞进对话,只有设置 MEMORIX_HOOK_DEBUG=1 才会输出诊断。

更新后重新跑一次:

npm install -g [email protected]
memorix setup --agent opencode

然后重启 OpenCode 就行。谢谢你补了截图和更新后的报错,正常 PATH 环境里很难把这条链路抓出来。

AVIDS2 avatar Jul 17 '26 04:07 AVIDS2