3 ms·
Won't this break every time the log format changes?
by 6LLvveMx2koXfwn 8mo ago
Won't this break every time the log format changes?
- matt1398 8mo agoI actually had the exact same worry when I started building this. But it turns out Claude Code's official VS Code extension is built to read these exact same local `.jsonl` files. So unless Anthropic decides to intentionally break their own first-party extension, it should remain relatively stable. Of course, they will add new payload types (like the recent "Teams" update), but when that happens, it's pretty trivial to just add a new parser handler for it—which I've already been doing as they update the CLI. So far, it's been surprisingly easy to maintain!
- kzahel 8mo agoYeah this is a risk, the jsonl format is not a documented api surface. I have a similar project that started out as just a log viewer but is now a full session manager etc (https://github.com/kzahel/yepanywhere https://github.com/kzahel/yepanywhere). My approach was to occasionally run zod schema validations against all my local sessions to make sure the frontend has a pretty faithful schema. I've noticed sometimes when I run claude cli it modifies some jsonl files, it might be doing some kind of cleanup or migration, I haven't looked too deeply into it (yepanywhere detects when files change so I see those sessions as "unread, externally tracked")