claude-code - 💡(How to fix) Fix [BUG] Session history shows empty — extension writes session files but never updates history.jsonl [1 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#52134Fetched 2026-04-23 07:35:45
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Author
Participants
Timeline (top)
labeled ×5

The VSCode extension's "Session history" UI consistently shows no past conversations. After every window reload, all session context is lost. This has been ongoing for approximately 3 weeks.

The extension does write session conversation data (.jsonl files under ~/.claude/projects/), but does not write corresponding entries to ~/.claude/history.jsonl, which appears to be the index the session history UI reads from.

Error Message

Diagnostic findings

Session data IS being written to disk

~/.claude/projects/bbd-automation/4f584612-a4fa-4068-926e-bbc02d8b0ee1.jsonl (89KB) ~/.claude/projects/-bbd-automation/c09db1db-49c5-4428-9cb6-56357aadd4a1.jsonl (112KB) ~/.claude/projects/bbd-automation/d49dfd02-af32-47e4-a05c-ba7e72493e2a.jsonl (114KB) ... (14 session files total across projects)

Session index is stale and incomplete

~/.claude/history.jsonl:

  • Total entries: 26 (all valid JSON, no corruption)
  • Last modified: 2026-04-01 (3 weeks ago, stopped updating)
  • Entries for analytics-tests-status-report project: 0
  • Sessions in index: 7 out of 14 on disk (50% missing)
  • Current active session (54b5bcb1): NOT in index
  • File is writable, no lock held by any process
  • Has com.apple.provenance xattr (macOS provenance flag)

Extension logs show no response to session list requests

From Claude VSCode.log:

13:59:51.943 [info] Received message from webview: {"type":"request","requestId":"hyjnmwdl6m","request":{"type":"list_sessions_request"}} (no response logged — session list presumably returns empty)

13:59:53.479 [info] Received message from webview: {"type":"request","requestId":"rgi6asz6s5s","request":{"type":"list_remote_sessions"}} 13:59:53.567 [info] Keychain read failed, trying file fallback 13:59:53.567 [warning] No OAuth token available for teleport 13:59:53.568 [error] Error processing client request: Error: Failed to connect to remote server

The list_remote_sessions failure is expected (Bedrock auth, no Anthropic OAuth token). The list_sessions_request (local) fires but produces no visible response in the log.

No extension globalStorage directory

~/Library/Application Support/Code/User/globalStorage/anthropic.claude-code/ → Does not exist

Root Cause

The VSCode extension's "Session history" UI consistently shows no past conversations. After every window reload, all session context is lost. This has been ongoing for approximately 3 weeks.

The extension does write session conversation data (.jsonl files under ~/.claude/projects/), but does not write corresponding entries to ~/.claude/history.jsonl, which appears to be the index the session history UI reads from.

Code Example

## Diagnostic findings

### Session data IS being written to disk


~/.claude/projects/bbd-automation/4f584612-a4fa-4068-926e-bbc02d8b0ee1.jsonl  (89KB)
~/.claude/projects/-bbd-automation/c09db1db-49c5-4428-9cb6-56357aadd4a1.jsonl  (112KB)
~/.claude/projects/bbd-automation/d49dfd02-af32-47e4-a05c-ba7e72493e2a.jsonl  (114KB)
... (14 session files total across projects)


### Session index is stale and incomplete


~/.claude/history.jsonl:
  - Total entries: 26 (all valid JSON, no corruption)
  - Last modified: 2026-04-01 (3 weeks ago, stopped updating)
  - Entries for analytics-tests-status-report project: 0
  - Sessions in index: 7 out of 14 on disk (50% missing)
  - Current active session (54b5bcb1): NOT in index
  - File is writable, no lock held by any process
  - Has com.apple.provenance xattr (macOS provenance flag)


### Extension logs show no response to session list requests

From `Claude VSCode.log`:

13:59:51.943 [info] Received message from webview: {"type":"request","requestId":"hyjnmwdl6m","request":{"type":"list_sessions_request"}}
  (no response logged — session list presumably returns empty)

13:59:53.479 [info] Received message from webview: {"type":"request","requestId":"rgi6asz6s5s","request":{"type":"list_remote_sessions"}}
13:59:53.567 [info] Keychain read failed, trying file fallback
13:59:53.567 [warning] No OAuth token available for teleport
13:59:53.568 [error] Error processing client request: Error: Failed to connect to remote server


The `list_remote_sessions` failure is expected (Bedrock auth, no Anthropic OAuth token). The `list_sessions_request` (local) fires but produces no visible response in the log.

### No extension globalStorage directory


~/Library/Application Support/Code/User/globalStorage/anthropic.claude-code/
Does not exist
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?

Description

The VSCode extension's "Session history" UI consistently shows no past conversations. After every window reload, all session context is lost. This has been ongoing for approximately 3 weeks.

The extension does write session conversation data (.jsonl files under ~/.claude/projects/), but does not write corresponding entries to ~/.claude/history.jsonl, which appears to be the index the session history UI reads from.

Environment

  • Claude Code Extension: 2.1.117-darwin-arm64
  • VSCode: macOS (Darwin 25.2.0, Apple Silicon)
  • Auth method: AWS Bedrock (CLAUDE_CODE_USE_BEDROCK=1), not Anthropic API directly
  • Model: global.anthropic.claude-opus-4-6-v1
  • Workspace type: Multi-root workspace (3 folders)
  • Preferred location: Sidebar (claudeCode.preferredLocation: "sidebar")

What Should Happen?

Expected behavior

  • history.jsonl should be updated each time a user sends a message in a session
  • list_sessions_request should return all local sessions for the current project
  • Session history UI should show past conversations that can be resumed

Error Messages/Logs

## Diagnostic findings

### Session data IS being written to disk


~/.claude/projects/bbd-automation/4f584612-a4fa-4068-926e-bbc02d8b0ee1.jsonl  (89KB)
~/.claude/projects/-bbd-automation/c09db1db-49c5-4428-9cb6-56357aadd4a1.jsonl  (112KB)
~/.claude/projects/bbd-automation/d49dfd02-af32-47e4-a05c-ba7e72493e2a.jsonl  (114KB)
... (14 session files total across projects)


### Session index is stale and incomplete


~/.claude/history.jsonl:
  - Total entries: 26 (all valid JSON, no corruption)
  - Last modified: 2026-04-01 (3 weeks ago, stopped updating)
  - Entries for analytics-tests-status-report project: 0
  - Sessions in index: 7 out of 14 on disk (50% missing)
  - Current active session (54b5bcb1): NOT in index
  - File is writable, no lock held by any process
  - Has com.apple.provenance xattr (macOS provenance flag)


### Extension logs show no response to session list requests

From `Claude VSCode.log`:

13:59:51.943 [info] Received message from webview: {"type":"request","requestId":"hyjnmwdl6m","request":{"type":"list_sessions_request"}}
  (no response logged — session list presumably returns empty)

13:59:53.479 [info] Received message from webview: {"type":"request","requestId":"rgi6asz6s5s","request":{"type":"list_remote_sessions"}}
13:59:53.567 [info] Keychain read failed, trying file fallback
13:59:53.567 [warning] No OAuth token available for teleport
13:59:53.568 [error] Error processing client request: Error: Failed to connect to remote server


The `list_remote_sessions` failure is expected (Bedrock auth, no Anthropic OAuth token). The `list_sessions_request` (local) fires but produces no visible response in the log.

### No extension globalStorage directory


~/Library/Application Support/Code/User/globalStorage/anthropic.claude-code/
  → Does not exist

Steps to Reproduce

Reproduction

  1. Open a multi-root workspace in VSCode with Claude Code extension
  2. Start a conversation in the sidebar
  3. Have a full conversation (session .jsonl file grows on disk)
  4. Reload the VSCode window
  5. Click "Session history" — list is empty
  6. Previous conversation context is completely lost

Claude Model

None

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.91

Platform

AWS Bedrock

Operating System

macOS

Terminal/Shell

VS Code integrated terminal

Additional Information

Additional context

  • The CLI (claude --resume) also relies on history.jsonl and shows the same stale data
  • The extension's PreToolUse hook (AWS credential check) works correctly and is not interfering
  • No other AI extensions installed that could conflict
  • Workspace trust is not restricted

extent analysis

TL;DR

The issue can be fixed by investigating and resolving the failure to update the history.jsonl file, which is causing the session history UI to show no past conversations.

Guidance

  • Investigate why the history.jsonl file is not being updated: check for any errors or exceptions in the extension's code that might be preventing the update.
  • Verify that the list_sessions_request is being handled correctly: check the extension's logs for any errors or warnings related to this request.
  • Check the file system permissions: ensure that the extension has write access to the ~/.claude/history.jsonl file.
  • Test the CLI (claude --resume) to see if it also fails to update the history.jsonl file: this can help determine if the issue is specific to the VSCode extension or a more general problem.

Example

No code example is provided as the issue is related to the extension's behavior and not a specific code snippet.

Notes

The issue seems to be related to the extension's failure to update the history.jsonl file, which is causing the session history UI to show no past conversations. The fact that the CLI also relies on this file and shows the same stale data suggests that the issue might be more general than just the VSCode extension.

Recommendation

Apply a workaround by manually updating the history.jsonl file or investigating the extension's code to resolve the issue, as the root cause is not clearly identified.

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…

FAQ

Expected behavior

  • history.jsonl should be updated each time a user sends a message in a session
  • list_sessions_request should return all local sessions for the current project
  • Session history UI should show past conversations that can be resumed

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] Session history shows empty — extension writes session files but never updates history.jsonl [1 participants]