Skip to content

[BUG] sessions-index.json stops updating - new sessions not appearing in /resume picker (Linux/WSL2) #23421

@juangutierrezmonaco

Description

@juangutierrezmonaco

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 sessions-index.json file stops updating at some point, causing new sessions to not appear in the /resume
picker. Session .jsonl files are correctly written to disk, but they are never registered in the index file.

Steps to Reproduce

  1. Use Claude Code normally over multiple sessions across several days
  2. Run /resume to see the list of past conversations
  3. Notice that recent sessions (last 2-3 days) are missing from the list
  4. Verify that the .jsonl session files exist on disk:
    ls -lt ~/.claude/projects/<project-path>/*.jsonl | head -10
  5. Check sessions-index.json and confirm it has not been updated:
    cat ~/.claude/projects//sessions-index.json

Expected Behavior

All sessions should appear in /resume. The sessions-index.json file should be updated every time a new session is
created.

Actual Behavior

sessions-index.json stopped updating on Feb 3rd. Sessions from Feb 3, 4, and 5 exist as .jsonl files (including one
that is 6.6 MB) but are not in the index. The last indexed session is from Jan 29.

The sessions can still be resumed manually using:
claude --resume

This has happened repeatedly - sessions keep "disappearing" from /resume.

Diagnostic Data

  • 5 session files on disk not present in sessions-index.json
  • sessions-index.json last meaningful update: Jan 29, file mtime: Feb 3
  • Largest missing session: 6.6 MB (e60db920-8e16-4f8d-855a-2a8f48ed1802.jsonl)
  • Index contains 11 entries, but at least 16 session files exist

Environment

  • Claude Code version: 2.1.31
  • OS: Linux (WSL2) - Linux 6.6.87.2-microsoft-standard-WSL2
  • Platform: Ubuntu on Windows WSL2
  • Shell: bash

Related Issues

Labels (seleccionalos en la barra lateral)

  • bug
  • area:core
  • platform:linux

What Should Happen?

Every time a new Claude Code session is created, it should be registered in the sessions-index.json file so it appears in the /resume picker. All sessions should be visible and resumable from the /resume list.

Error Messages/Logs

Steps to Reproduce

  1. Use Claude Code on a project over multiple days with several sessions

  2. After a few days, run /resume to list past conversations

  3. Notice that recent sessions (last 2-3 days) are missing from the picker

  4. Verify session files exist on disk but are not indexed:

    Session .jsonl files exist:

    ls -lt ~/.claude/projects//*.jsonl | head -10

    Shows files from Feb 3, 4, 5

    But sessions-index.json only has entries up to Jan 29:

    cat ~/.claude/projects//sessions-index.json

    Last entry is from Jan 29, 11 entries total

    Meanwhile there are at least 16 .jsonl session files on disk

  5. Sessions CAN be resumed manually with: claude --resume
    This confirms the session data is intact, just not indexed.

In my case, 5 sessions across 3 days were written to disk but never added
to sessions-index.json. The largest missing session is 6.6 MB. This issue
has happened repeatedly - it's not a one-time occurrence.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.1.32 (Claude Code)

Platform

Anthropic API

Operating System

Other Linux

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:corebugSomething isn't workinghas reproHas detailed reproduction stepsplatform:linuxIssue specifically occurs on LinuxstaleIssue is inactive

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions