In the example below, I need to add {} just after "but this is not", or I get an error. I would expect the correct this extra pair of braces not to be needed.
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\node[at={(0,0)}, node contents=this is fine];
\draw (0,0) to node [node contents=but this is not]{} (0,-1);
\end{tikzpicture}
\end{document}
The problem is that if
nodeis encountered as part of a path, TikZ first scans the rest of the path before processing the node options.