Same thing bit me. What fixed it was keeping the session id next to the checkout instead of letting the directory be the key. Small local db, one row per worktree. Resume then doesn't care where I'm standing, it just continues that transcript. I've got worktrees I haven't touched in weeks that still pick up fine.

One thing I didn't expect: forking a conversation copies the history into a new transcript. So anything you count per transcript, cost in my case, double counts that prefix. Resuming the same id doesn't.