4. Let $a, b$ be real numbers, and satisfy
$$
\begin{array}{l}
\tan (2009 a+2008)+\arcsin (2009 a+2008) \\
=-2007, \\
\tan (2009 b+2008)+\arcsin (2009 b+2008) \\
=2007 .
\end{array}
$$

Then $a+b=$ . $\qquad$
4. $-\frac{4016}{2009}$.

Let $f(x)=\tan x+\arcsin x$. Then $f(x)$ is an odd and monotonically increasing function on $[-1,1]$.
From the condition, we have $-1 \leqslant 2009 a+2008 \leqslant 1$, which implies $-1 \leqslant a \leqslant-\frac{2007}{2009}$.
Similarly, $-1 \leqslant b \leqslant-\frac{2007}{2009}$.
Thus, $-2 \leqslant a+b \leqslant-\frac{4014}{2009}$, and
$$
\begin{array}{l}
f(2009 a+2008)=-2007 \\
=-f(2009 b+2008) \\
=f(-2009 b-2008) .
\end{array}
$$

Then $2009 a+2008=-2009 b-2008$.
Therefore, $a+b=-\frac{4016}{2009}$.