What is wrong with this proof of Cartan's second equation? Let $(M,g)$ be a Riemannian manifold and $\nabla$ a metric compatible connection. Let $\{e_a\}$ be a local orthonormal basis of vector fields on some open set $U\subset M$. We define the connection $1$-forms $\omega^a_b$ by
$$\nabla_X e_b = \omega^a_b(X)e_a.$$
Let $\operatorname{Rm}$ be the Riemann tensor defined by $$\operatorname{Rm}(X,Y)Z=\nabla_X\nabla_YZ-\nabla_Y\nabla_XZ-\nabla_{[X,Y]}Z.$$
One defines the curvature $2$-forms $\Omega^a_b$ by
$$\frac{1}{2}\operatorname{Rm}(X,Y)e_b=\Omega^a_b(X,Y)e_a.$$
I want to prove Cartan's second equation $$\Omega^a_b=d\omega^a_b-\omega_b^c\wedge \omega_c^a.$$
I just computed $\operatorname{Rm}(X,Y)e_b$ using the connecton $1$-forms:
$$\operatorname{Rm}(X,Y)e_b = \nabla_X\nabla_Y e_b - \nabla_Y \nabla_X e_b - \nabla_{[X,Y]}e_b\\
=\nabla_X\left[\omega^a_b(Y)e_a\right]-\nabla_Y\left[\omega^a_b(X)e_a\right]-\omega^a_b([X,Y])e_a\\
=X(\omega^a_b(Y))e_a+\omega^a_b(Y)\nabla_X e_a-Y(\omega^a_b(X))e_a-\omega^a_b(X)\nabla_Y e_a-\omega^a_b([X,Y])e_a.$$
Now we know that $$d\omega^a_b(X,Y)=X(\omega^a_b(Y))-Y(\omega^a_b(X))-\omega^a_b([X,Y]),$$
hence the above evaluates to
$$\operatorname{Rm}(X,Y)e_b = d\omega^a_b(X,Y)e_a + \omega^a_b(Y)\omega^c_a(X)e_c-\omega^a_b(X)\omega^c_a(Y)e_c\\
=d\omega^a_b(X,Y)e_a-2 \omega^a_b\wedge \omega_a^c(X,Y) e_c.$$
Now this last equation gives, upon using the definition of the curvature $2$-forms
$$\Omega^a_b = \dfrac{1}{2}d\omega^a_b - \omega_b^c\wedge \omega_c^a.$$
So there is this $1/2$ factor wrong in front of $d\omega^a_b$.
I have already read my computations again a few times but did not spot what I'm doing wrong.
So what is wrong with my approach? Why I'm getting this $1/2$ in front of $d\omega^a_b$?

The mistake is in your formula for $d\omega^a_b$. You seem to be using the following convention for the wedge product (which I call the Alt convention in my book Introduction to Smooth Manifolds):
$$
\alpha\wedge\beta(X,Y) = \frac1 2 (\alpha(X)\beta(Y) - \alpha(Y)\beta(X)).
$$
Using that convention, the formula for $d$ of a $1$-form should be
$$
d\alpha (X,Y) = \frac 1 2 (X(\alpha(Y)) - Y(\alpha(X)) - \alpha([X,Y]).
$$
Your formula for $d\omega^a_b$ is missing the factor $\frac 1 2$.
You can also do this computation using the other wedge product convention (which I call the determinant convention):
$$
\alpha\wedge\beta(X,Y) = \alpha(X)\beta(Y) - \alpha(Y)\beta(X).
$$
With this convention, the formula for $d\alpha$ doesn't have the factor of $1/2$, and you also have to define the curvature form without the factor $1/2$:
$$
\text{Rm}(X,Y)e_b = \Omega_b^a(X,Y)e_a.
$$
In both cases, the structure equation comes out the way you wrote it:
$$
\Omega_b^a = d\omega_b^a - \omega^c_b \wedge \omega^a_c.
$$
