4. As shown in Figure $1, O$ is the center of a sphere with radius 1, points $A, B, C$ are on the surface of the sphere,
$O A, O B, O C$ are pairwise perpendicular,
$E, F$ are the midpoints of the arcs
$\overparen{A B}, \overparen{A C}$, respectively. Then the spherical distance between points
$E, F$ on the surface of the sphere is $\qquad$ .
4. $\frac{\pi}{3}$.

From the given information, we have plane $OAB \perp$ plane $OAC$.
As shown in Figure 2, in the plane $OAB$, draw $EM \perp OA$ through point $E$, with the foot of the perpendicular at $M$, and connect $MF$.
It is easy to see that $MF \perp OA$.
Thus, $ME \perp MF$, and
$$
\begin{array}{l}
\angle MOE \\
=\angle MOF=\frac{\pi}{4}.
\end{array}
$$

Therefore, $ME = MF = \frac{\sqrt{2}}{2}, EF = 1$.
Hence, $\triangle OEF$ is an equilateral triangle, $\angle EOF = \frac{\pi}{3}$. Therefore, the spherical distance between points $E$ and $F$ on the sphere is $\frac{\pi}{3}$.