Normally you can see which phase he's in by whether the 3 revealed cards are still out. To avoid this, the Black Market deck has to be empty.
Right.
The only treasure card I can find, where you knowing matters, is Contraband (you want to know if he can play more action cards). But if this is the case, he can just always answer that it's still his action phase.
Asking which phase he is in when contrabanding is meaningless because no card (except Black Market) lets him buy a card in the Action phase.
When he can buy cards isn't the point.
After playing Contraband he has $6 and one card left in hand. You know the only treasure he has left are Coppers. He does have action cards giving $2, and he has 1 action left.
If he's in his action phase, he can maybe afford Province, and then you want to name Province to avoid that.
If he's in his buy phase, you know that he can't afford Province, and you want to name something cheaper.