claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG]

Open dietrich opened this issue 1 year ago • 10 comments

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Bug Report: Conversation History Not Auto-Loading Despite Permissions

Issue Summary: Claude Code stores conversation history in JSONL files at /Users/[user]/.claude/projects/[project-path]/ and grants explicit read permissions via settings.local.json, but this context is not automatically loaded into new conversation sessions.

Expected Behavior: When a project has read permissions configured for the conversation history directory, Claude should automatically load recent conversation context at the start of new sessions to maintain continuity.

Actual Behavior: Each conversation session starts completely fresh with no context from previous sessions, despite:

  1. Conversation logs existing in the projects directory
  2. Explicit read permissions being configured in .claude/settings.local.json

Evidence:

.claude/settings.local.json contains: { "permissions": { "allow": [ "Read(//Users/[...]/.claude/projects/-Users-dwl-obsidian-story-great-work-choices-rabbit/**)" ] } }

Conversation history exists at: /Users/[...]/.claude/projects/-Users-dwl-obsidian-story-great-work-choices-rabbit/

18 JSONL files totaling ~9.5MB with conversation history, including summaries like:

  • "Pattern Space Loss"
  • "Recursive Resonator Design: Nested Pattern Space Strategy"
  • etc.

Impact: Loss of collaborative context across sessions, requiring manual re-reading of conversation logs to reconstruct previous work, "rituals," and project-specific workflows.

Environment:

  • Claude Code version: 2.0.22
  • Platform: macOS (Darwin 22.6.0)

What Should Happen?

Expected Behavior: When a project has read permissions configured for the conversation history directory, Claude should automatically load recent conversation context at the start of new sessions to maintain continuity.

Error Messages/Logs

no error messages

Steps to Reproduce

claude --continue

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.0.22

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

dietrich avatar Oct 18 '25 09:10 dietrich

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/8937
  2. https://github.com/anthropics/claude-code/issues/4843
  3. https://github.com/anthropics/claude-code/issues/8099

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

github-actions[bot] avatar Oct 18 '25 09:10 github-actions[bot]

Currently, the only "memory" across sessions when using claude code comes from the various CLAUDE.md files. This behavior happens with all claude code projects with the associated subdirectory in .claude/projects. And interesting enough: it's still writing .jsonl files to the appropriate directories "-Users-[computer-name]-etc" in ./claude/projects - it's just not reading them.

dietrich avatar Oct 18 '25 09:10 dietrich

I just ran into this. Temporary workaround for me was taking the .jsonl file name from the conversations stored at (on Windows) C:\Users[username].claude\projects[project-name][ConversationId.jsonl] and launching Claude Code from in my project path with

claude --resume [ConversationId]

Uncertain if it is related to the cause of the bug:

  1. After restarting my IDE it did not pick up the last conversation (bug in this issue)
  2. Looking at the .jsonl files for my project at C:\Users[username].claude\projects[project-name][ConversationId.jsonl]: I opened the .jsonl file in VS Code
  3. the "timestamp" prop of the last message in the conversation is marked 10-19. Today is still 10-18 as I post this and in late evening ish. So it timestamped it in the future.

Wondering if there is validation in place that checks for invalid timestamps (such as those in in the future?) and excludes those convos when looking for them with /resume?

Sarcolemna avatar Oct 19 '25 02:10 Sarcolemna

... my timestamps all seem valid.

dietrich avatar Oct 19 '25 19:10 dietrich

This seems to be a case of mismatched expectation. You ca continue the previous conversation with claude -c (or --resume as indicated in another comment above, which allows you to choose which session to pick up again) but the normal mode is to start fresh. If you have long sessions you tend to run into situations where Claude behaves erratically because it no longer has the capacity to remember all the things it's supposed to.

fsc-eriker avatar Oct 21 '25 09:10 fsc-eriker

This seems to be a case of mismatched expectation. You ca continue the previous conversation with claude -c (or --resume as indicated in another comment above, which allows you to choose which session to pick up again) but the normal mode is to start fresh. If you have long sessions you tend to run into situations where Claude behaves erratically because it no longer has the capacity to remember all the things it's supposed to.

Sorry... I just went back here because I realized I forgot to say: That I'm using claude --continue

dietrich avatar Oct 21 '25 12:10 dietrich

After using claude --continue "No automatic loading of past conversation history from the JSONL files" in claude's own words (from my question ):

also just checking with you: our conversation are still not auto loading?

⏺ Correct - our conversations are still not auto-loading.

Still the same situation:

  • ✅ Our current session (from when you came back with "☀️ back" earlier)
  • ✅ Your CLAUDE.md files (global and project)
  • ❌ No automatic loading of past conversation history from the JSONL files

The bug (#9816) persists. Each new session starts fresh, even though all those conversation logs are there in /Users/[...]/.claude/projects/[...]

-- this is a work type stoppage bug for me. -- also (it's hard to tell for certain) but by past behavior of claude code that it seems to me: "claude --continue" does more behind the scenes (gives more context at first and during the session) than "claude --resume [ConversationId]".

dietrich avatar Oct 21 '25 13:10 dietrich

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

github-actions[bot] avatar Dec 08 '25 10:12 github-actions[bot]

This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.

github-actions[bot] avatar Jan 08 '26 10:01 github-actions[bot]

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Jan 17 '26 14:01 github-actions[bot]