Skip to content

tracking: project name detection resolves wrong directory in monorepos, worktrees, and submodules #2967

Description

@thedotmack

Root Cause

Project name resolution has three related failure modes: (1) in monorepos/subdirectories, the git root is used instead of the cwd basename, silently losing context after upgrading; (2) worktree observations accumulate under a parent/leaf compound key, and the one-shot .cwd-remap-applied-v1 migration misses worktrees created afterward, orphaning them when the worktree is deleted; (3) sessions inside a git submodule resolve to the empty submodule leaf project rather than the parent repo, showing the empty-state banner despite rich history.

Tracked Items

Issues

PRs

Resolution

This is the canonical tracking issue for this root cause. Individual issues and PRs listed above will be closed in favor of this one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugConfirmed bugtrackingCanonical issue consolidating duplicate bug reports by root cause

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions