anthropics / anthropics/claude-code

[Bug] Session ID collision causes empty scrollback and "already in use" errors in background sessions

Đang mở
#87,399 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
area:agent-view area:core bug platform:windows stale
Ngôn ngữ chính
Python
Star
145k
Fork
23.1k
Chỉ số merge pull request
Chỉ số pull request đang chờ

Mô tả

**Bug Description**
Title: Session ID collision: background sessions open with empty scrollback, new sessions fail with "already in use"

▎ Environment
▎ - Claude Code v2.1.233
▎ - Windows 11 Home 10.0.26200, PowerShell
▎ - Model: Opus 5 (1M context)

▎ What happened
▎ Worked normally through Aug 16, 2026. On Aug 17 the background agents view (the multi-session "claude agents" list) began failing three ways:

▎ 1. Opening an existing background session from the list renders only the most recent user message — the entire prior scrollback is missing from the UI.
▎ 2. Starting a new session from the list prompt fails with: Session can't start — Session ID 24b2f818-7e64-482b-9cf4-a6ea893b057a is already ... (truncated in the UI).
▎ 3. A previously-completed row shows: exit 1 before init — Error: Ses...

▎ Data is intact
▎ The transcripts are fine. ~/.claude/projects// holds all session .jsonl files at expected sizes and mtimes, including the ones that render empty. This is a UI/session-registry problem, not data loss.

▎ Also noted: ~/.claude/jobs/ gained six job directories within four minutes (13:34–13:38) while these failures occurred. One of them, 24b2f818, matches the colliding session ID but has no corresponding .jsonl in the project directory.

▎ Expected
▎ Opening a background session shows its full history; new sessions receive a unique ID.

**Environment Info**
- Platform: win32
- Terminal: xterm-256color
- Version: 2.1.233
- Feedback ID: d1ae0ec3-dfb4-4ef1-9b7a-957be3079033

**Errors**
```json
[]
```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Start by reproducing the failures in the background agents view on Windows with Claude Code v2.1.233, using the reported session and job directories under ~/.claude/projects// and ~/.claude/jobs/. Compare the registry/session behavior with the intact transcript files. Done means existing background sessions display their full history and new sessions receive unique IDs; the issue does not name source files or tests.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
powershell, python
Lĩnh vực
backend, cli
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
42/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.