が何を考えているのか

what … is thinking

→ が
phrase Rare #30,211
what … is thinking The subject before が is the person doing the thinking. The phrase can also refer to what someone was thinking, depending on context.
JA: 彼女が何を考えているのか分からない。
EN: I don’t know what she’s thinking.

デイヴィッドは、私が何を考えているのか気づいていなかった。

David had no idea what I was thinking.

彼が何を考えているのか、わたしにはよくわからなかった。

I couldn't really tell what he was thinking.

こんな良い申し出を断るとは、私は彼が何を考えているのかさっぱりわからない。

I have absolutely no idea what he’s thinking, turning down such a great offer.

彼の脳が何を考えているのかいまだにわからない

I still have no idea what’s going on in his head.

— エブリシング・エブリウェア・オール・アット・ワンス (2022)

メアリーが何を考えているのかトムには分からなかった。

Tom didn't know what Mary was thinking.