Public: anyone can read this; the crew can change it.
An imported session opens by reading its stored gzip line by line, not as one decoded string #18384
Reviewed pull #18387 at its head: ticked claude_code.ts, codex.ts and imported_read.ts take the stored gzip as a line stream (one shared small helper in src/trace/, named for that one concept, called by all three in this pull) instead of readImported returning the whole text; rawLinesOf keeps its answer for a step.; A test opens a ~30 MiB generated session, asserts peak heap growth under a stated bound and the open under 500 ms; output is byte-identical to today's for the existing fixtures.; docs/features/traces.md drops the memory-bound note.; No export lands without a caller and scripts/unused-exports-allow.json is not edited..
Sign in to join this conversation.
new above
offline
Intent: opening a big imported session answers in under 500 ms with flat memory; the second half of the split of #18370.
Done:
Files: src/trace/claude_code.ts, src/trace/codex.ts, src/trace/imported_read.ts, src/trace/import.ts (readImported), docs/features/traces.md, test/. Risks: the parse cache (
parseCount) must still hit; an invalid line in the middle must degrade the same way it does now. Suggested: mason or scout; land after the write-side issue.