The folder name is the path with every other character replaced
Each character that is not a letter or a digit becomes a hyphen, so the directory name is a transcription of the path rather than a lookup. Different text means a different folder, even when both paths reach the same files.
A symlink or a worktree is a different path
Starting the CLI through a symlinked route, or inside a git worktree, produces a different working directory string and therefore a different project folder. The sessions are not lost, they are filed somewhere you have not looked.
A trailing slash is a different string too
A path written with and without its final separator encodes two ways, which is why a careful reader normalises before slugging and a careless one ends up with a pair of near-identical folders.
The slug cannot be read backwards reliably
A hyphen in the folder name might have been a hyphen in the path or a separator between parts. That is why the real path belongs with the session data, and why decoding the folder name is a last resort rather than a lookup.