To what direction will a compass in a magnetic medium points? The direction of $B$-field or that of the $H$-field? Question in title.
To avoid "same direction" answers, let's assume the B and H are pointing in different direction, i.e., the magnetic permeability is not a diagonal matrix. What direction will a compass (theoretically) embedded inside a magnetic medium points to?
I feel B-field is the answer because the Lorentz force law f=q(E+v*B) involves only E-field and B-field, regardless of whether the medium is magnetic or dielectric. And since the operation of the compass must involve Lorentz force in some way, it can therefore only depends on B-field and E-field?
 A: Usually treatment of H and B is superficial. While there is a chapter in Jackson which derives the macroscopic fields from the microscopic, Jackson also refers to Robinson's 'Macroscopic Electrodynamics' for further information.
In Robinson we find:"The majority of texts
state, as a matter of definition, that the couple acting on a magnetic needle of moment m in a fluid medium, in which there is a uniform impressed field $B = \mu \mu_0 H$ where $\mu$ > 1, is m x B
while a few texts state that it is m x $\mu_0$ H. Now, if m has already been defined, both these
statements cannot be true. In fact, as Stopes-Roe and Whitworth (1971) have recently
shown experimentally, the couple is m x $\mu_0$ H."
This is the paper: https://doi.org/10.1038/234031a0
Since it was published in nature one should strongly consider it that this confirms that the needle will point in the H direction.
What is surprising to me though, is that this was only settled in 1971. (well H and B are not so different in liquids, and in solids the needle wouldn't move)
A: The needle of a compass is, for all intents and purposes, a little dipole permanent magnet.
According to Jackson [1999], pages 184-190, the magnetic torque, $\mathbf{N}$, acting on a dipole magnetic moment, $\mathbf{m}$, is given by:
$$
\mathbf{N} = \mathbf{m} \times \mathbf{B} \tag{0}
$$
That is, the magnetic field will want to minimize the potential energy between the magnetic moment and the magnetic field, $\mathbf{B}$.  The force acting on the dipole from an external magnetic field is then given by:
$$
\mathbf{F} = \nabla \left( \mathbf{m} \cdot \mathbf{B} \right) \tag{1}
$$
which is the negative gradient of a scalar potential.  The potential is minimized when the magnetic field and magnetic moments are aligned (i.e., sign matters here).

To what direction will a compass in a magnetic medium points? The direction of B-field or that of the H-field?

The compass needle will align with the local $\mathbf{B}$, not $\mathbf{H}$.
References

*

*J.D. Jackson, Classical Electrodynamics, Third Edition, John Wiley & Sons, Inc., New York, NY, 1999.

A: In Roche: "B and H, the intensity vectors of magnetism: A new approach to resolving a century-old controversy", Am. J. Phys. 68 (5), May 2000,
we find that

An average which seems more useful than either the above-defined h or b is the line average of the microfields perpendicular to the magnetization, since this will determine the magnetic deflection of a charged subatomic particle moving rapidly through the medium. I have not found a rigorous argument to prove that this is equal to b, and there are good reasons for supposing that it will not be b, in general, for an ordered medium. However, if the medium is random, there
seem good informal reasons to suppose it will be equal to b over a finite path, since the series of microscopic paths described effectively covers all field possibilities. This appears to have been confirmed experimentally [Rasetti].

And from Rasetti:"Deflection of Mesons in Magnetized Iron", Phys. Rev., voL. 66, JULY, 1944, pp1-5

The deflection of mesons in a magnetized ferromagnetic medium was investigated. A beam of mesons was made to pass through 9 cm of iron, and the resulting distribution of the beam was observed. Two arrangements were employed. In the first arrangement, the deflection due to the field caused a fraction of the mesons to hit a counter placed out of line with the others. An increase of sixty percent in the number of coincidences was recorded when the iron was magnetized. In the second arrangement, all the counters were arranged in line, and the deflection due to the field caused an eight percent decrease in the number of coincidences. These results are compared with theoretical predictions deduced from the known momentum spectrum of the mesons and from the geometry of the arrangement. The observed effects agree as well
as can be expected with those calculated under the assumptions that the effective vector inside the ferromagnetic medium is the induction B, and that the number of low energy mesons is correctly given by the range-momentum relation.

