anthropics / anthropics/claude-code

[Bug] Session history stale for days: sidebar and ccd_session_mgmt list_sessions omit all recent sessions (Windows desktop, 2.1.235)

Abierto
#88,076 3 comentarios 0 reacciones 0 asignados Ver en GitHub
area:desktop bug has repro platform:windows
Lenguaje dominante
Python
Estrellas
145k
Forks
23.1k
Métricas de merge de PR
Métricas de PR pendientes

Descripción

# [Bug] Session history stale for 9 days — sidebar and session-management MCP omit all recent sessions (Windows desktop)

## Environment
- Claude Code 2.1.235, Windows desktop app
- OS: Windows 11 Pro 10.0.26200
- Model in session: claude-fable-5 (session UI also used with Opus 5)
- Locale: ja-JP

## Summary
The session history shown in the desktop app sidebar, and the results of the built-in
`mcp__ccd_session_mgmt__list_sessions` tool, are stale by ~9 days. Both list only a single
session dated 2026-08-11, while `~/.claude/projects/` on disk contains many newer sessions,
including 3 sessions from today (2026-08-20) in one project alone. This broke session
continuity for the user in a costly way (details below).

## Evidence (all times JST, 2026-08-20)
Filesystem, project `C--Users-yossy-jquants-client`:

| session jsonl | last write | size |
|---|---|---|
| 6fd1df53-…jsonl | 08-20 03:49 | 3.1 MB |
| 5ee69986-…jsonl | 08-20 05:36 | 275 KB |
| ed0497ad-…jsonl (current) | 08-20 06:32+ | 737 KB+ |
| 214f0267-…jsonl | 08-08 00:21 | 611 KB |

Project `C--Users-yossy` (same machine) also has sessions from 08-20 04:50 and 08-20 06:07.

`mcp__ccd_session_mgmt__list_sessions` (called twice ~30 min apart from the current session,
including after an app restart) returns ONLY:

```json
[{"sessionId":"local_b8947bff-…","title":"東北・北海道・沖縄が空白になる理由",
"cwd":"C:\\Users\\yossy\\pj_kippou","isArchived":false,"isRunning":false,
"lastActivityAt":"2026-08-11T07:00:37.725Z"}]
```

The sidebar UI shows the same stale content (user screenshot, 05:51 JST): one pj_kippou
session from 08-11 and one "yossy" session; none of the day's sessions appear.

## User-visible impact (why this matters)
1. The user ended a session at 05:36 mid-discussion, opened a new session at 06:08 and
typed "再開" (resume). The agent could not discover the 05:36 session through
`list_sessions` (not listed), fell back to the last on-disk project summary (written by
an older overnight session), and resumed a different workstream. To the user this
presented as the assistant "suddenly doing completely different work" — significant
token waste and loss of trust. The agent only found the true predecessor by manually
scanning `~/.claude/projects/*.jsonl` write times.
2. A background Bash task started in the current session was orphaned when the Claude Code
process exited; on reload the task-notification reported: "No completion record was
found for this background shell command from the previous session… it may have been
running when the previous Claude Code process exited." Combined with the stale session
index, recovery of in-flight work is effectively impossible.

## Expected behavior
- Sidebar and `list_sessions` reflect the sessions that exist under `~/.claude/projects/`
(or the same store the resume feature uses), including sessions from minutes ago.
- Background tasks either survive process restarts or leave a completion/kill record.

## Notes
- Machine also has a separate reproducible crash (app-window GPU crash when the in-app
Browser pane loads WebGL pages, 5 occurrences 08-11..08-13, persists on Intel driver
32.0.101.7088). Mentioned only because process exits from that crash may interact with
the orphaned-background-task behavior above.

---
Filed via Claude Code at the user's request.
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Start by tracing the built-in mcp__ccd_session_mgmt__list_sessions entry point and compare its results with the session JSONL files under ~/.claude/projects/. Check how the sidebar obtains the same session data and verify that recent sessions appear after normal activity and an app restart; done means both views list current sessions consistently.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
python
Área
cli, desktop
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Activo
Claridad
Bastante claro
Aptitud para principiantes
42/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.