r/ClaudeCode • u/Sea-Perception1619 • 17m ago
Discussion Claude Code writes request replays into transcripts as role user, and my memory tool quoted them back as things I said
If you build anything that reads ~/.claude/projects/*.jsonl, look for rows with "type": "api-request-blob". Claude Code writes them with message.role set to user, but they're replays of the whole request (skill bodies, hook output, system reminders) and nobody typed them.
I found it because some "strong beliefs" in daimon's briefings (my session-memory tool) didn't ring a bell, and a few didn't make sense at all. Traced back, they weren't claims: "Do not retry:", half a sentence, a git diffstat line, my own hook output. Every one was marked verbatim with a passing quote check. The loader admitted blob rows as user messages, so the check found the text, passed it, and the briefing handed it back to me as something I'd said.
So I owe a correction on a post I made in r/AIMemory in October. I wrote that every item "is marked verbatim (an exact quote, string-checked against the transcript) or inferred". The string check was real. What it searched included blob text though, which means a quote could pass and still be words Claude Code wrote.
Fixed in v0.79.0. Blob rows are dropped at load, and every admitted message carries authored_by: person, host or unknown. unknown is never treated as me.
On my machine the top-level session files hold about 23,600 blob rows, a bit over 5,000 of them with role user. To check yours (read-only, needs jq):
jq -c 'select(.type=="api-request-blob") | .message.role' ~/.claude/projects/*/*.jsonl | sort | uniq -c
Subagent transcripts sit a folder deeper and that glob skips them.
PR #1459 has the per-host signals if you're parsing Kimi or Codex logs too: https://github.com/Daily-Nerd/daimon
•
u/AutoModerator 17m ago
Hey! Thanks for posting to r/ClaudeCode
While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.
For help, project discussions, tips, and general chat, join the ClaudeCode Discord.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/SharpKaleidoscope182 5m ago
Claude likes to poison other claudes