The Torah tells us to choose life and the prophets often tell us to do Teshuvah. This seems to be implicitly saying we have free will. Is there anywhere in Tenach which explicitly talks about free will and it’s limits.
The Rishonim talk a lot about G-d hardening Pharaoh’s heart.
However, there are other examples in Tenach of G-d taking away a person’s free will
In Divrei Hayamim 2 10:15 it says that Rechavam did not listen to the advice of the elders as it was the will of G-d.
Melachim 1 11:14 tells us that G-d incited Ben Hadad against Shlomo.
In Yirmiyahu 25:9, G-d calls Nebuchadnezzar His servant.
Does anywhere in Tenach explicitly explain how free will works?
If not Tenach, what about chazal?
In general, man has the option to do as he chooses, and this he uniqueness of man- that he has free will. Without free will, there is no real reason for us to get rewarded for all of our good deeds, because we were programed to do so. A person doesn’t give his car a reward for driving well, but if a neighbor does us a favor, we will buy him a present. This is because the neighbor didn’t have to do it and chose to do so. There are however times when Hashem will take a person’s free will away, and in a way force the person to do what Hashem wants to happen. One of these places was Pharaoh. His free will was taken away from him, after he neglected it numerous times, and in order for Hashem to show His dominion over the world by bringing the supernatural plagues upon Egypt. Additionally, it can happen to kings, as the verse (Mishlei 21-1) says, “The hearts of kings are in the hand of Hashem”. The Malbim explains the reason for this, that since if the destiny of many is in his hands and he can ruin things for many, therefore, his heart is in Hashem’s hands regarding public decisions.
In general though, for what is practical for us regular people to know is that what ever we do is our decision, and therefore we are responsible for our actions. This is why we will God willing e rewarded so nicely in the world to come, for whatever good deeds we performed.