Random and path dependent traversal cost for each node (Grid Graph)

The easiest option I think would be if I could access the path in in the ITraversalProvider and the previous nodes. However, I can not get the previous nodes when I try the following:

        public uint GetTraversalCost(Path path, GraphNode node)
        {
            Debug.Log(path.vectorPath.Count); /// -> yields 0 
            Debug.Log(path.path.Count); /// -> yields 0
        }

I also found this post that talks about something similar and it seems like it should be possible.

What am I doing wrong?