Let $f$ be a continuous bounded function.
$X$ is a Feller process, and $\hat X$ is its Cadlag modification. By the definition of the modification, one can write
$$\mathbb E[f(X\_t)] = \mathbb E[f(\hat X\_t)], \ \forall t>0$$
I wonder if it is safe to generalize the above identity to a hitting time. More precisely, we define exit time for an open set $O$ by
$$\tau = \inf\{t\ge 0: X\_t \notin O\}, \ 
\hat \tau = \inf\{t\ge 0: \hat X\_t \notin O\}.$$


[Q.] Is
$\mathbb E[f(X\tau)] = \mathbb E[f(\hat X\_{\hat \tau})]$ true? If not, is there any counter-example?


I guess it is true and very fundamental result, since many papers on stochastic processes start with problem setup on the modification process without further discussion. For instance, at the beginning of Section III.3 of the book 
[D Revuz and M. Yor] of strong Markov property, they write:


"We shall consider the canonical Cadlag version of a Feller process..."


Discussion 1:
However, most references discuss only the existence of such a version, but not the above question.


Discussion 2: By adopting the definition Feller process given by Page 88 of [book](https://books.google.com.hk/books?id=OYbnCAAAQBAJ&lpg=PP1&dq=continuous%20martingales%20and%20brownian%20motion&pg=PA88#v=onepage&q=feller%20processes&f=false), the existence of Cadlag modification is guaranteed by section III.2 of the book [D Revuz and M Yor].



Is it safe to work on a Cadlag modification of a Feller process?
I think the following example says no.


Consider the state space $\{0,1\}$. Let $U$ be a uniform random variable on $[0,1]$ and let $X\_t = 1$ if $t=U$ and $X\_t = 0$ otherwise. Note that $X\_t$ is a.s. not cadlag, but for each $t$ we have $X\_t = 0$ a.s., so $X\_t$ is a modification of the cadlag process $\hat{X}\_t$ that just sits at 0. Taking $\mathcal{G}\_t = \sigma(X\_s : s \le t)$, unless I am mistaken, $X\_t$ meets the Revuz/Yor definition of a Markov process (under its natural filtration). We may take the transition semigroup to simply be the identity $P\_t f = f$, which is Feller.


But if we let $\tau = \inf\{t : X\_t \ne 0\}$ and let $f(0)=0$, $f(1)=1$, then $E[f(X\_\tau)] = 1$ while since $\hat{\tau} = +\infty$ we might consider $E[f(\hat{X}\_{\hat{\tau}})] = 0$.


By a similar trick you can get a discontinuous modification of Brownian motion, with which I think you can get an example where $\hat{\tau}$ is a.s. finite.


