6. For any $\theta \in\left[0, \frac{\pi}{2}\right]$, such that
$$
|\sin \theta-p \cos \theta-q| \leqslant \frac{\sqrt{2}-1}{2}
$$

the real number pairs $(p, q)$ that always satisfy the condition are
$6 .\left(-1, \frac{1+\sqrt{2}}{2}\right)$.
The problem is equivalent to: For any $x \in [0,1]$, we have
$\left|\sqrt{1-x^{2}}-(p x+q)\right| \leqslant \frac{\sqrt{2}-1}{2}$.
Let $y_{1}=p x+q, y_{2}=\sqrt{1-x^{2}}$. Thus,
$y_{2}-\frac{\sqrt{2}-1}{2} \leqslant y_{1} \leqslant y_{2}+\frac{\sqrt{2}-1}{2}$.
Therefore, the line $l(y=p x+$
$q)$ is between the curve $C_{1}(y=$
$\left.\sqrt{1-x^{2}}-\frac{\sqrt{2}-1}{2}\right)$ and $C_{2}$
$\left(y=\sqrt{1-x^{2}}+\frac{\sqrt{2}-1}{2}\right)$
(see Figure 7). It is easy to know that $O^{\prime} B$
$=\sqrt{2}$. Thus, the distance from $\theta^{\prime}$ to $A B$ is $1\left(O^{\prime}\right.$ has coordinates $\left(0,-\frac{\sqrt{2}-1}{2}\right), A, B$ represent the endpoints of arc $C_{2}$).
Clearly, $A B$ is tangent to the curve $C_{1}$, and $A B$ is the only line that can be between the curves $C_{1}$ and $C_{2}$, so $l$ is $A B$. Therefore, we find $p=-1, q=\frac{1+\sqrt{2}}{2}$.