claude-code - 💡(How to fix) Fix [BUG] CLI session not writing .jsonl file — invisible to VS Code extension [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#48685Fetched 2026-04-16 06:53:47
View on GitHub
Comments
2
Participants
2
Timeline
8
Reactions
0
Timeline (top)
labeled ×5commented ×2closed ×1

Error Message

Error Messages/Logs

RAW_BUFFERClick to expand / collapse

Preflight Checklist

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

What's Wrong?

When continuing a session that was compacted/summarized (context limit reached), the new continuation session does not create a .jsonl file in ~/.claude/projects/<project>/. As a result, the session is invisible to the VS Code extension's session picker, even though other CLI sessions from the same project directory are visible.

What Should Happen?

Continuation sessions write a .jsonl file just like initial sessions.

Desired end result is that compacted sessions created via CLI should be visible via Claude VS extension when running the same version. Currently unable to continue conversation between CLI and VS as a result.

Error Messages/Logs

Steps to Reproduce

Steps to reproduce:

  1. Start a CLI session in a project directory
  2. Let it run until context is compacted/summarized
  3. Continue the session — a new session ID is assigned (e.g. 760ce763)
  4. Check ~/.claude/projects/<project>/ — no .jsonl exists for the new session ID
  5. Open VS Code with the same project folder — the session does not appear in the session list

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.109

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

extent analysis

TL;DR

The issue can be potentially resolved by modifying the session continuation logic to write a .jsonl file for the new session ID.

Guidance

  • Investigate the session continuation code to ensure it correctly handles the creation of a new .jsonl file when a session is compacted/summarized and continued.
  • Verify that the ~/.claude/projects/<project>/ directory has the necessary permissions for the CLI to write the .jsonl file.
  • Check the Claude Code documentation for any specific configuration options related to session file management.
  • Test the session continuation with a different project directory to isolate if the issue is project-specific.

Example

No specific code example can be provided without more context about the Claude Code internals.

Notes

The provided information does not include error messages or logs, which could be helpful in diagnosing the issue. Additionally, the lack of information about previous working versions makes it difficult to determine if this is a regression.

Recommendation

Apply a workaround by manually creating a .jsonl file for the new session ID in the ~/.claude/projects/<project>/ directory, if possible, to test if this resolves the visibility issue in the VS Code extension.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] CLI session not writing .jsonl file — invisible to VS Code extension [2 comments, 2 participants]