4. Let $f_{0}=0, f_{1}=1, f_{n+2}=f_{n+1}+f_{n}(n=$ $0,1,2, \cdots)$, and let $x_{1} \in \mathbf{R}, x_{n}=\frac{f_{n-1}+f_{n-2} x_{1}}{f_{n}+f_{n-1} x_{1}}$ $(n=2,3,4, \cdots)$. If $x_{2004}=\frac{1}{x_{1}}-1$, then $x_{1}$ equals
(A) $\frac{-1 \pm \sqrt{5}}{2}$
(B) $\frac{-1-\sqrt{5}}{2}$
(C) $\frac{-1+\sqrt{5}}{2}$
(D) $\frac{ \pm 1+\sqrt{5}}{2}$
4. A.

Let $x_{n}=\frac{1}{x_{1}}-1(n=2004)$, then
$$
\begin{array}{l}
\frac{f_{n-1}+f_{n-2} x_{1}}{f_{n}+f_{n-1} x_{1}}=\frac{1}{x_{1}}-1 \\
\Rightarrow \frac{1}{x_{1}}=\frac{f_{n+1}+f_{n} x_{1}}{f_{n}+f_{n-1} x_{1}} \\
\Rightarrow f_{n+1} x_{1}+f_{n} x_{1}^{2}=f_{n}+f_{n-1} x_{1} \\
\Rightarrow f_{n} x_{1}^{2}+f_{n} x_{1}-f_{n}=0,
\end{array}
$$

i.e., $x_{1}^{2}+x_{1}-1=0$.
Solving, we get $x_{1}=\frac{-1 \pm \sqrt{5}}{2}$.