Let $G_d$ be the group with the following presentation $$\langle x,y \mid x^{2^{d+1}}=1, x^4=y^2, [x,y,x]=x^{2^{d}}, [x,y,y]=1\rangle,$$ where $d>2$ is an integer. It is clear that $G_d$ is a finite $2$-group of nilpotency class at most $3$. It is easy to see that $[x,y]^2=1$ and since the quaternion group $Q_8$ of order $8$ is a quotient of $G_d$, $[x,y]$ has order $2$. So the nilpotency class of $G_d$ is $2$ or $3$.
The computation with GAP shows that $G_d$ is nilpotent of class exactly $3$, whenever $d=3,4,5,6,7,8,9$.
Question: Is the nilpotency class of $G$ $3$?