Hooks silently not loaded from a local directory marketplace; ZCode 0.16.5 Stop transcript is assistant-only so stock sync always fails
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 45/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Ruhig
- Tech-Stack
- javascript
- Bereich
- devtools
Rechercherichtung
The report describes two independent failures: hooks not loading from a local directory marketplace and assistant-only Stop transcripts failing sync. Start by tracing hook registration and the Stop hook's transcript handling, then inspect the ZCode session-store workaround described in the issue. Done means the failures are handled or surfaced clearly and sync works for the reported ZCode 0.16.5 case; no relevant source files or tests are named.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Environment: plugin 0.2.0, nmem 0.10.73, ZCode CLI 0.16.5 / App 3.10.0, macOS — two Macs with identical versions of both nmem and the plugin.
We spent a full day diagnosing why one Mac auto-synced ZCode sessions and the other silently synced nothing. Two independent failure modes found; documenting both so others (and the plugin) can short-circuit this.
1. Same plugin, different marketplace source → hooks loaded vs never loaded
- Mac A installed via the GitHub marketplace source → plugin hooks load, sessions auto-sync. ✅
- Mac B installed the same plugin 0.2.0 from a local directory marketplace (local clone registered as a
directory-type source) → ZCode never loads the plugin's hooks. ❌
The only observable signal is in ZCode's startup log (~/.zcode/cli/log/zcode-<date>.jsonl, event bootstrap.app.startup.plugins.completed): hookCount: 0 on Mac B vs a positive count on Mac A. Nothing surfaces in the UI; nmem doctor shows everything green on both. Sessions just silently never sync.
The marketplace registration itself looks healthy on Mac B: plugin listed as enabled, cache populated, commands/skills resolvable.
Suggestions:
- Make hooks from
directory-source marketplaces load identically to GitHub-sourced ones — or fail loudly / document the limitation. - Add a doctor check "ZCode actually registered the plugin's hooks" (reading the same
hookCountsignal), so this failure mode is diagnosable without cross-machine diffing.
2. ZCode 0.16.5's Stop transcript contains only the last assistant message
ZCode 0.16.5's hook runner writes the Stop transcript as a single JSONL line with only the final assistant message:
{"message":{"content":[{"text":"…","type":"text"}],"role":"assistant"}}
(see Hei() in zcode.cjs — JDr("assistant", e.responseText ?? e.responsePreview)).
nmem t sync --from zcode then rejects it with:
ZCode session needs at least one user and one assistant message
So on this ZCode build the stock Stop hook fires but the sync can never succeed — the error only appears in hook stderr.
Workaround we deployed (working reliably on 0.16.5): instead of copying transcript_path, the Stop hook exports the full user/assistant conversation for session_id straight from ~/.zcode/cli/db/db.sqlite (session/message/part schema is OpenCode-compatible), emits it in the same one-line-per-message format, and feeds that to t sync --from zcode --apply. Full conversation per turn, idempotent, and it also survives the assistant-only transcript limitation.
Longer-term options:
- Have the hook script fall back to reading the ZCode sqlite store (like the workaround above), or
- Have
t sync --from zcodetolerate assistant-only transcripts by pulling the missing user turns via--session-id.
Footnote
Two more things that extended our debugging session, in case they help others:
- The MCP server
typemust behttp(notstreamableHttp) in~/.zcode/cli/config.json— wrong values are silently skipped (only aconfig.mcp_server.skippedwarn in the same log file). - Hooks are registered when the ZCode process starts; editing
config.jsonrequires a full app restart for hooks (MCP reconnects per session and picks changes up immediately).
- Vorherrschende Sprache
- JavaScript
- Sterne
- 3
- Forks
- 1
- Ø Merge
- 1 Min.
- Gemergte PRs (30 T.)
- 1
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus nowledge-co/zcode-plugin
-
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Alle Issues in nowledge-co/zcode-plugin
Ähnliche Issues
-
FEATURE REQUEST
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
linuxmint/cinnamon-spices-extensions#1193 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Fei2411/DeepSeek-Bot#703 ·
-
area:web first-timers-only good first issue
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 95/100
career-ops-hq/career-ops#6264 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 83/100
cline/mcp-marketplace#3394 ·
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 77/100
exelearning/exelearning#2677 ·
Maintainer antworten meist innerhalb von 1 Tag