[BUG] /resume shows different sessions and incorrect data between TUI and VSCode extension
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?
The /resume command has two probably-related critical issues:
- TUI and VSCode discover different sessions: Valid session files appear in one interface but not the other, in both directions. Some sessions that exist and are visible in TUI don't appear in VSCode, and vice versa.
- VSCode shows incorrect and incomplete session data: Sessions that do appear in VSCode:
- Sometimes show wrong metadata: incorrect message counts and timestamps; bugged
API Error: 401 {"type":"error","error":{"type":"authenticati...descriptions despite being currently logged in. - Resuming them sometimes loads truncated conversation history missing recent messages.
Both issues make /resume unreliable for continuing previous work.
What Should Happen?
/resumeshould discover and display the same sessions in both TUI and VSCode extension when working in the same project directory- Session metadata should accurately reflect the actual file contents
- Resuming a session should load the complete conversation history from the session file
Error Messages/Logs
No explicit error messages - sessions silently fail to appear or show incorrect data. See screenshots for demonstrations of these bugs.
**Setup:**
Working directory: `/home/dgealow/claude_test`
Sessions stored in: `~/.claude/projects/-home-dgealow-claude-test/`
**Bug 1: Sessions appear in one interface but not the other**
**Example 1 - Session visible in VSCode but NOT in TUI:**
Session `d804e3da-eab7-4019-8cdc-ebc572f1afee.jsonl` (balloon conversation):
- File exists and is valid: 16 lines, 8 message exchanges, modified 2025-10-01 05:48:39 UTC
- Verification: `cat ~/.claude/projects/-home-dgealow-claude-test/d804e3da-eab7-4019-8cdc-ebc572f1afee.jsonl | wc -l` returns 16 lines
- VSCode `/resume` (Screenshot 2): Shows as "I see the conversation we had about balloons..." (though with incorrect metadata)
- TUI `/resume` (same project): Does NOT appear at all
Multiple other valid v2.0.2 sessions also don't appear in TUI:
- `a252cfbd-e375-4b51-98aa-71b1b62f5afd.jsonl` - modified 2025-10-01 15:19:01
- `0e2ff662-e082-4a25-80bf-a02024f680fd.jsonl` - modified 2025-10-01 15:16:13
- `5d37fc5d-0b65-4a62-a281-b591433b0475.jsonl` - modified 2025-10-01 15:03:56
**Example 2 - Sessions visible in TUI but NOT in VSCode:**
Screenshot 1 shows TUI `/resume` displaying sessions from a production project that don't appear when running `/resume` in VSCode for the same project.
**Bug 2: VSCode shows incorrect metadata and truncated history**
**Example 1 - Wrong message count:**
Session `d804e3da-eab7-4019-8cdc-ebc572f1afee` (balloon conversation):
- Actual file: 16 lines, 8 message exchanges
- VSCode displays (Screenshot 2/3): "98 messages"
- Off by more than 10x
**Example 2 - Truncated conversation when resuming:**
Session `9d272698-21d8-48ac-8364-11d02fea1b2d` (current conversation):
- Actual file: 65 lines (complete conversation)
- When resumed in VSCode: Missing last ~12 messages
- TUI shows complete data from same file
- Demonstrates VSCode loading stale/incomplete data
**Additional observation:**
Screenshot 2 shows multiple sessions with "API Error: 401" titles in VSCode, suggesting the extension may be having trouble reading or parsing certain session files.
Steps to Reproduce
I don't know how to specifically reproduce the particular sub-issues, but having multiple conversations in a project, some in VScode and some in the TUI, tends to make something go wrong. Especially if you ever compact or rewind a conversation.
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
It seems to have gotten worse with the VSCode beta, but similar issues were present before.
Claude Code Version
2.0.2 (Claude Code)
Platform
Anthropic API
Operating System
Other Linux
Terminal/Shell
VS Code integrated terminal
Additional Information
Screenshots demonstrating the bugs:
Screenshot 1: VSCode session picker vs TUI /resume output in production project
Notice that the first 5 conversations (from 2 minutes to 5 hours ago) shown in the TUI don't show up in VSCode. Note also the "Selenium and Beautiful Soup" description, c.f. #6452
<img width="2790" height="2034" alt="Image" src="https://github.com/user-attachments/assets/7dfa7f9e-441e-4810-90af-1654934ebc0f" />
Screenshot 2: VSCode session picker vs TUI /resume output in debug project
Notice that the conversations from 7m and 9h ago show up in VSCode but not the TUI, and that both have the bugged API Error: 401 {"type":"error","error":{"type":"authenticati... descriptions.
<img width="2046" height="1970" alt="Image" src="https://github.com/user-attachments/assets/fe9ed3aa-bf91-41f2-a3e3-fd5766dcc3a9" />
Screenshot 3: VSCode showing incomplete conversation
Opening the same conversation in VSCode and TUI shows all messages in the TUI, but is missing a number of recent messages in VSCode.
<img width="2188" height="2110" alt="Image" src="https://github.com/user-attachments/assets/102e0363-f58d-45f0-9d67-b89a21c163d8" />
Speculative root cause analysis:
- TUI and VSCode extension use different session discovery/indexing logic
- Neither implementation reliably discovers all valid session files
- VSCode appears to cache session metadata instead of reading files directly
- VSCode may not fully reload session files when resuming, resulting in stale/truncated data
- Authentication errors seem to persistently corrupt session descriptions
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗