Is this $X_T$ if the stopping time is $T \le \infty$?
Let $(\Omega, \mathscr{F}, \{\mathscr{F_n}\}_{n \in \mathbb{N}}, \mathbb{P})$ be a filtered probability space, and let $X = ({X_n})_{n \in \mathbb{N}}$ be a stochastic process adapted to $(\{\mathscr{F_n}\}_{n \in \mathbb{N}})$
If $T$ is an a.s. finite stopping time, we have:
$$X_T = X_1 1_{T=1} + X_2 1_{T=2} + ... $$
right?
What if $T \le \infty$ and $[\lim X_n]$ exists? Do we have
$$X_T = [\lim X_n] 1_{T=\infty} + X_1 1_{T=1} + X_2 1_{T=2} + ... $$
What if $[\lim X_n]$ dn exist?
For the first one you are right of course (finite stopping times), For the second question then yes again but be aware that some authors do not allow a stopping times to be infinite to avoid any problems in that case, some others always express their claims by conditioning with respect to the event $T<\infty$ on $X_T$.
For the last one well then $X_T$ is not measurable so you can't say anything but my preceding remark on conditioning applies.
Best regards