I have that $h_{t}(w)=f(h_{t-1}(w),w)$ and $h_{1}(w)=f(w)$ and I'm trying to find $y = \frac{\partial h_{t}}{\partial w}$
My attempt so far
$\frac{\partial h_{t}}{\partial w} = \sum_{i=1}^{t} \frac{\partial h_{t}}{\partial h_{i}} * \frac{\partial h_{i}}{\partial w}$
But it doesn't feel right. In particular, it's as if each second term in the sum will correspond to its own sum.
To reach what I did, I used the fact that $h_t$ is a function of all $h_i$ for $1<=i<=t-1$ with each (including $h_{t}$) being a function in $w$
From the comments I wonder if this is what you are asking.
Suppose we are given some $c\in\mathbb{R}$ and some function $f:\mathbb{R}^2\to\mathbb{R}$, all of whose derivatives exist. Then we can define recursively a sequence of functions (of a single variable) $h_t:\mathbb{R}\to\mathbb{R}$ by
$$ h_t(w)= \begin{cases} c &\text{ when $t=0$;}\\ f(h_{t-1}(w),w) &\text{ when $t\geqslant 1$.} \end{cases} $$
Find an expression for $h_t'(w)$.
Notation: Let us write $f_1(x,y)$ for $\frac{\partial f}{\partial x}(x,y)$, and $f_2(x,y)$ for $\frac{\partial f}{\partial y}(x,y)$.
The derivatives of the first few $h_t$ are as follows.
$$ \begin{eqnarray} h_0'(w) &=& 0;\\ h_1'(w) &=& f_2(h_0(w),w);\\ h_2'(w) &=& f_1(h_1(w),w)f_2(h_0(w),w)+f_2(h_1(w),w);\\ h_3'(w) &=& f_1(h_2(w),w)f_1(h_1(w),w)f_2(h_0(w),w)+f_1(h_2(w),w)f_2(h_1(w),w)+f_2(h_2(w),w). \end{eqnarray} $$
I think it's clear what the pattern is, and that it would be straightforward to prove by induction. But it would be a notational nightmare and perhaps not very illuminating.
If there is an easier answer to this question I hope someone will post it and then I can delete this very extended comment.