fix(claudbg-9627): scan up to 20 lines for cwd field in session discovery
The project path was missing for sessions whose first JSONL line has no cwd field. Fix reads up to 20 non-empty lines to find any entry with cwd (typically a system-type entry that may not be at line 1). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>main
parent
f45a0dfd87
commit
0bca469701
@ -1,10 +1,15 @@
|
|||||||
---
|
---
|
||||||
# claudbg-9627
|
# claudbg-9627
|
||||||
title: 'sessions list: some sessions show no project path'
|
title: 'sessions list: some sessions show no project path'
|
||||||
status: todo
|
status: completed
|
||||||
type: bug
|
type: bug
|
||||||
|
priority: normal
|
||||||
created_at: 2026-03-31T23:44:53Z
|
created_at: 2026-03-31T23:44:53Z
|
||||||
updated_at: 2026-03-31T23:44:53Z
|
updated_at: 2026-04-01T05:59:53Z
|
||||||
---
|
---
|
||||||
|
|
||||||
Some entries in `claudbg sessions list` do not display a project path. Investigate why the project path is missing for certain sessions.
|
Some entries in `claudbg sessions list` do not display a project path. Investigate why the project path is missing for certain sessions.
|
||||||
|
|
||||||
|
## Summary of Changes
|
||||||
|
|
||||||
|
Fixed `read_cwd_from_first_line()` in `src/parser/discovery.rs`. The old code stopped after the first non-empty line even if it contained no `cwd` field. The fix scans up to 20 non-empty lines looking for any entry with a `cwd` field. Claude Code typically writes `cwd` on a `system`-type entry which may not be the very first line in all session files.
|
||||||
|
|||||||
Loading…
Reference in New Issue