# Fix: claude-code plugin - Empty Assistant Messages on Sessions (v0.1.11) #9
waynesutton
started this conversation in
Changelog
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Fix: Empty Assistant Messages on Sessions (v0.1.11)
We shipped claude-code-sync v0.1.11 to fix a bug where assistant messages weren't showing up in your OpenSync dashboard.
What was happening
After upgrading to v0.1.10, some users reported:
The OpenCode plugin worked fine. Only the Claude Code plugin had this issue.
Why it happened
Claude Code hooks work differently than we expected.
When the
Stophook fires, Claude Code does NOT passresponseortoken_usagedirectly in the payload. Instead, it sends atranscript_pathpointing to a JSONL file on disk.What we expected to receive:
{ "session_id": "abc123", "response": "Done. I added the feature...", "token_usage": { "input": 500, "output": 100 } }What Claude Code actually sends:
{ "session_id": "abc123", "transcript_path": "~/.claude/projects/.../abc123.jsonl" }The actual conversation data lives in that transcript file, not in the hook payload.
How we fixed it
We updated the plugin to read and parse the transcript file directly.
New
parseTranscriptFile()function reads the JSONL transcript and extracts:type: "assistant"entriesmessage.usagefieldsUpdated Stop handler now:
transcript_pathfrom the hook dataUpgrade instructions
Verify:
Should show
0.1.11or later.Testing the fix
Start a new Claude Code session and check your OpenSync dashboard for:
The takeaway
Claude Code hooks give you a
transcript_pathto a JSONL file containing the full conversation history. Unlike some other plugin systems that pass data directly, Claude Code requires reading and parsing this file to extract messages and token usage.If you're building integrations with Claude Code hooks, keep this in mind.
Thanks to @p4cs-974 for reporting this issue. Let us know in the comments if you see any other issues after upgrading.
Beta Was this translation helpful? Give feedback.
All reactions