sessions-index.json not created for new projects — Recent Activity empty
Bug Description
The "Recent Activity" section on the Claude Code welcome screen shows empty, even though multiple sessions exist and are resumable via claude --resume.
Root Cause
sessions-index.json is not being created/maintained in the project directory (~/.claude/projects/<project-id>/). The session .jsonl files are written correctly, but the index file that powers the Recent Activity UI is missing.
Reproduction
- Start Claude Code in a new project directory
- Have multiple conversations (creating multiple sessions)
- Exit and re-launch Claude Code
- Observe: "Recent Activity" is empty on the welcome screen
- However,
claude --resumecorrectly finds and lists all sessions
Evidence
- 5 session
.jsonlfiles exist in~/.claude/projects/-root-agent-sandbox/ - 40 entries in
~/.claude/history.jsonl sessions-index.jsonexists for older projects but was never created for the new projectclaude --resumeworks fine (it reads.jsonlfiles directly)
Environment
- Claude Code version: 2.1.63
- Platform: Linux (Ubuntu)
- Shell: zsh
Workaround
Manually creating sessions-index.json by parsing the existing .jsonl session files restores the Recent Activity display. The format matches the existing index files from other projects (version 1, with entries containing sessionId, fullPath, fileMtime, firstPrompt, messageCount, created, modified, gitBranch, projectPath, isSidechain).
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗