Skip to content

[BUG] /resume shows different sessions and incorrect data between TUI and VSCode extension #8667

Closed as not planned

Description

@dvg-p4

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?

The /resume command has two probably-related critical issues:

  1. 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.

  2. 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?

  1. /resume should discover and display the same sessions in both TUI and VSCode extension when working in the same project directory
  2. Session metadata should accurately reflect the actual file contents
  3. 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

Image

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.

Image

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.

Image

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

Activity

  1. dvg-p4 commented on Oct 1, 2025

    @dvg-p4
    Author

    I believe that these are likely related manifestations of a shared session management issue, but I can re-file tickets separately if preferred.

  2. github-actions commented on Oct 1, 2025

    @github-actions

    Found 3 possible duplicate issues:

    1. [BUG] Session switching with /resume shows wrong conversation in CC #8176
    2. [Bug] Incorrect Session Summaries with Cross-Contaminated Metadata #6452
    3. claude --resume lists only recent ~10 sessions despite having 38 in ~/.claude/projects #2333

    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

  3. dvg-p4 commented on Oct 1, 2025

    @dvg-p4
    Author

    Those other issues are likely related, but this one goes a bit further I think.

  4. changed the title [-][BUG] /resume shows different sessions and incorrect data between CLI and VSCode extension[/-] [+][BUG] /resume shows different sessions and incorrect data between TUI and VSCode extension[/+] on Oct 1, 2025
  5. github-actions commented on Dec 6, 2025

    @github-actions

    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.

  6. github-actions commented on Jan 6, 2026

    @github-actions

    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.

  7. github-actions commented on Jan 16, 2026

    @github-actions

    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.

  8. locked as resolved and limited conversation to collaborators on Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:corearea:idearea:tuiautocloseIssue will be closed automaticallybugSomething isn't workinghas reproHas detailed reproduction stepsplatform:linuxIssue specifically occurs on Linux

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions