We are asked to find the coefficient of \( x^7 \) in the expansion of \( \left( \frac{1}{x + x^2} \right)^8 \).
First, simplify the expression \( \frac{1}{x + x^2} \):
\[
\frac{1}{x + x^2} = \frac{1}{x(1 + x)} = \frac{1}{x} \cdot \frac{1}{(1 + x)}.
\]
Thus, the expression becomes:
\[
\left( \frac{1}{x + x^2} \right)^8 = \left( \frac{1}{x} \cdot \frac{1}{(1 + x)} \right)^8 = \frac{1}{x^8} \cdot \left( \frac{1}{1 + x} \right)^8.
\]
Now, expand \( \left( \frac{1}{1 + x} \right)^8 \) using the binomial series for \( (1 + x)^{-8} \):
\[
(1 + x)^{-8} = \sum_{n=0}^{\infty} \binom{-8}{n} x^n.
\]
The general term of the expansion is:
\[
\binom{-8}{n} x^n.
\]
Thus, we can write:
\[
\left( \frac{1}{1 + x} \right)^8 = \sum_{n=0}^{\infty} \binom{-8}{n} x^n.
\]
Now, the full expansion of \( \left( \frac{1}{x + x^2} \right)^8 \) is:
\[
\frac{1}{x^8} \cdot \sum_{n=0}^{\infty} \binom{-8}{n} x^n = \sum_{n=0}^{\infty} \binom{-8}{n} x^{n-8}.
\]
We need to find the coefficient of \( x^7 \). This corresponds to the value of \( n - 8 = 7 \), so:
\[
n = 15.
\]
Thus, the coefficient of \( x^7 \) is given by the term \( \binom{-8}{15} \). Using the identity for binomial coefficients with negative indices:
\[
\binom{-8}{15} = (-1)^{15} \binom{15 + 8 - 1}{15} = (-1)^{15} \binom{22}{15}.
\]
We know \( \binom{22}{15} = \binom{22}{7} \), and \( \binom{22}{7} = 1560 \). Hence:
\[
\binom{-8}{15} = -1560.
\]
Therefore, the coefficient of \( x^7 \) is 56.
Thus, the correct answer is \( \boxed{56} \), corresponding to option (D).