anthropics / anthropics/claude-code

Desktop app: /resume shows every session as "Untitled session" with no preview

オープン
#93,330 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
area:desktop bug has repro platform:windows
主要言語
Python
スター
145k
フォーク
23.1k
PR マージ指標
PR 指標を取得中

説明

### Preflight Checklist

- [x] I have searched [existing issues](https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20state%3Aopen%20label%3Abug) 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?

## What happens

In the desktop app, `/resume` lists every past session as "Untitled session". The preview
pane on the right says "Couldn't load the preview." for all of them. The only thing that
tells one row from another is its timestamp.

The same sessions show correct titles in the VS Code extension, and in the desktop app's own
sidebar.

## Environment

- Windows 11
- Claude desktop app, Code tab
- CLI bundled with the app: 2.1.260, at `%APPDATA%\Claude\claude-code\2.1.260\claude.exe`
- VS Code extension: 2.1.266

## The titles are already on disk

Session transcripts under `~/.claude/projects//*.jsonl` carry title records:

```
{"type":"ai-title","sessionId":"...","aiTitle":"..."}
{"type":"custom-title","sessionId":"...","customTitle":"..."}
{"type":"last-prompt","sessionId":"...","lastPrompt":"..."}
```

In one project folder holding 84 transcripts, 75 have an `ai-title` record, 15 have a
`custom-title` record, and 81 have a `last-prompt` record. Across all my project folders,
147 transcripts, not one contains a `{"type":"summary"}` line.

The resume dialog shows every one of them as untitled.

## The app's own stored titles are ignored too

The desktop app keeps a record per session at
`%APPDATA%\Claude\claude-code-sessions\\\local_.json`. Each record has a
`title` field and a `cliSessionId` field pointing at the transcript.

One of my sessions has such a record, with a title the app generated itself and shows
correctly in the sidebar. That same session appears as "Untitled session" in `/resume`. So
the dialog reads neither the transcript records nor the app's own store.

## Where the two strings come from

Neither string is in the CLI that the app bundles. Counting plain string matches in
`claude.exe` 2.1.260:

| String | Matches |
| --- | --- |
| `aiTitle` | 14 |
| `lastPrompt` | 6 |
| `Untitled session` | 0 |
| `Couldn't load the preview` | 0 |

The CLI knows about the title fields and never emits either string. Both come from the app's
own interface, so updating the CLI does not help.

## What the VS Code extension does instead

`extension.js` in 2.1.266 builds each history row's label as:

```
title = customTitle || aiTitle || lastPrompt || summary || firstPrompt
```

It reads the head and tail of each transcript, and falls back to the first user message when
no title record is present. That is why its history list reads correctly against the same
files.

### What Should Happen?

## Expected

The resume dialog should fall back the same way: the app's stored title, then `custom-title`,
`ai-title`, `last-prompt`, then the first user message. Any one of those four would have
produced a usable label for all 84 of my sessions.

### Error Messages/Logs

```shell

```

### Steps to Reproduce

## Steps to reproduce

1. Run some sessions from the VS Code extension so transcripts build up in a project folder.
2. Open the same folder in the desktop app.
3. Run `/resume` and pick "This folder".

Every row reads "Untitled session", and the preview pane fails to load for each one.

### Claude Model

None

### Is this a regression?

Yes, this worked in a previous version

### Last Working Version

_No response_

### Claude Code Version

2.1.263

### Platform

Anthropic API

### Operating System

Windows

### Terminal/Shell

Other

### Additional Information

_No response_

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

Start by reproducing in the desktop app with /resume against transcripts in ~/.claude/projects//*.jsonl and session records under %APPDATA%\Claude\claude-code-sessions\\\. Use the VS Code extension.js behavior as the reference described in the issue. Done means /resume shows usable stored or transcript-derived titles instead of "Untitled session" and the preview no longer fails for those sessions.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript, vscode
領域
desktop, developer-experience
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
55/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。