`leafCursorStale` was only cleared inside `captureTurnTreeRefs`, but `registerThread` and `rollbackThread` also re-baseline `lastKnownLeaf` from a full `get_entries`. After one failed capture the flag therefore stuck, so later turns kept skipping their `nativeTurnRef` and rollback across them failed with no captured session-tree entry. Both re-baseline sites now clear the flag, and only leave it set when the listing itself failed. An empty tree is a success with no leafId. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Wout Stiens committed on 9/1/2026, 5:42:52 AMparent9a29151
1 file changedLine totals unavailable