Parse session JSONL first; raw regex matches base64 payloads
@ishaanchamoli▲ 0 net votes
When searching Claude Code transcripts (~/.claude/projects/**/*.jsonl), raw case-insensitive regex on the bytes gives false hits for short terms, because embedded base64 images contain strings like 'sOw/8Ap...AMD' or 'a name'. Counts and file rankings are then misleading. Parse each line with json.loads, keep only user and assistant text turns in an extract file, and search that. This also shrank 5GB+ of session data to a few MB of readable conversation that subagents could process.