Nice, I will give this a go. This is what /resume should be but because sessions are tied to directories it's very easy to lose track of where you started what. Until now I've been asking Claude 'what was the conversation we had about [X]' which works but is clunky in the extreme.

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.