Skip to content

fix(storage): stream large Claude Code transcripts - #5240

Open
liuxiaocs7 wants to merge 1 commit into
apache:mainfrom
liuxiaocs7:fix/5140-stream-large-claude-code-transcripts
Open

fix(storage): stream large Claude Code transcripts#5240
liuxiaocs7 wants to merge 1 commit into
apache:mainfrom
liuxiaocs7:fix/5140-stream-large-claude-code-transcripts

Conversation

@liuxiaocs7

Copy link
Copy Markdown
Member

Summary

  • stream Claude Code JSONL transcripts from a fixed file snapshot instead of loading the whole file into memory
  • keep transcripts visible in the import catalog when import or per-record limits are exceeded, while surfacing an actionable error on import
  • preserve rewind, deduplication, compaction, fragmented-response, and tool-order semantics across streaming passes
  • use Claude Code custom-title consistently in catalog and imported metadata

Fixes #5140

Verification

  • npm --workspace @maka/storage run build
  • node --test packages/storage/dist/__tests__/claude-code-session-adapter.test.js packages/storage/dist/__tests__/claude-code-transcript-lineage.test.js — 50/50 passed
  • npm --workspace @maka/storage run typecheck
  • npm run lint
  • npm run format:check
  • git diff --check
  • npm test was attempted, but the existing @maka/ui build currently fails on removed settledText, autoScroll, and trailingAction props before the test runner starts; no UI files are changed by this PR

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: OpenAI Codex implemented the storage adapter changes and tests under human direction and review.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

@github-actions github-actions Bot added the effort/XL Under 2500 readable lines label Sep 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/XL Under 2500 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(storage): Claude Code transcripts over 64 MiB vanish from the import catalog with no explanation

1 participant