In many papers, the Taylor rule is described in this form: R(t)=f(Pi(t),Y(t),M(t),…), which however does not say anything about when the variables are determined. I just read Dynare code ( www2.bc.edu/~iacoviel/research_f … lo_aer.mod ) where

is used. Recently, I read Dynare code in this forum (which however did not yield correct results) with a Taylor rule that sets interest rates based on contemporenous Inflation and output.

Actually, the Taylor principle is usually considered as a determinacy condition to stabilize inflation and output gap. It states in particular that the coefficient associated with inflation must be greater than unity.
A simple rule depending essentially on contemporaneous variables is correct but can lead indeed to bad results.

There is no such thing as THE correct specification of the Taylor rule, there are just several specifications in the litterature, all of them valid.

Some of them are forward-looking (i.e. inflation and output gap in the future), others use contemporaneous values of these, still others use lagged values. And depending on the coefficients, you will get a stable model or not.

Some papers even investigate which is the best specification of the rule among these.