Skip to content

_wing_from_transcript_path fallback never matches Windows-encoded project folders (D--...) #2304

Description

@jarcastle

Observed on: 3.3.5 (Windows 11, Claude Code); fallback code unchanged at current develop.

Claude Code encodes project directories into transcript paths by replacing path separators with -. On POSIX the encoded folder starts with a leading dash (-home-user-project), but on Windows it starts with the drive letter: D--Code-BLM-blm-cadastral-returns-tools.

The fallback branch of _wing_from_transcript_path matches /\.claude/projects/-([^/]+) — it requires the leading dash, so every Windows-encoded folder misses and diary checkpoints land in the generic wing_sessions. Per-project wings never form from the fallback path.

The v3.3.6 change making JSONL cwd the primary wing source (#1424 / #1410) covers most real sessions, but whenever cwd is absent from the transcript the fallback still silently mis-wings on Windows. Note the existing "Windows" test exercises a POSIX-encoded folder name (-home-jp-Projects-myapp style), so the suite currently encodes the POSIX assumption rather than guarding against this.

Suggestion: accept [A-Za-z]-- drive-letter prefixes in the fallback regex (or relax it to "the last path component under .claude/projects/") and add a true Windows-encoded fixture to the test.

Effect at our site before upgrading: 100% of diary checkpoints in wing_sessions; project-filtered diary retrieval impossible. Searched open/closed issues for the drive-letter encoding and found nothing filed, hence this report.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions