"Earlier messages in this session weren't loaded" recurring across chats

Open
#111,510 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
18/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Active
Tech stack
typescript
Domain
cli

Research direction

Start by locating the resume/session-loading path in the TypeScript sources — where a session .jsonl is read back and the "Earlier messages weren't loaded" notice is emitted — then reproduce with a large transcript (the report cites ~19MB/8900 lines and sessions over 500MB). Compare what the loader parses against the intact file on disk to find where turns are dropped or truncated. Done means the notice only appears when the transcript is genuinely missing or unreadable, covered by a test with an oversized session fixture.

Written by the indexing model from the issue text.

Description

area:core bug

What happened: The system notice "Earlier messages in this session weren't loaded. Claude won't see them, so repeat anything it still needs." appears repeatedly, across multiple different chats for the same account, breaking context continuity with no explicit error. Verified in one occurrence: the actual session .jsonl file on disk was fully intact and up to date, including the most recent turns — so this looks like a display/context-loading issue on resume, not actual data loss.

What the user said: "lo sto avendo in molte chat, che succede?" ("I'm getting this in many chats, what's happening?"). Clarified afterward: it happened closing and reopening the SAME chat on the SAME machine.

Repro: Not isolated with certainty. Several of this user's sessions are unusually large (hundreds of MB, some >500MB of transcript); the specific session involved in the verification was ~19MB / ~8900 lines.

Cause: Not verified — unconfirmed hypothesis: unusually large session file size may interact badly with historical context loading on resume.

Dominant language
TypeScript
Stars
156k
Forks
25k
Avg merge
16h 19m
Merged PRs (30d)
5

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

  • No Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from anthropics/claude-code

All issues in anthropics/claude-code

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.