Jonah's time inside the sea creature was not the fate of prey, but a manifestation of divine providence designed to guard and save him in the heart of the sea, even after he tried to suppress his prophetic mission [ביאור שטיינזלץ]. Once God recognized that Jonah had achieved complete repentance, genuinely regretting his actions and committing never to flee again, the moment for his release arrived. Ultimately, nothing can stand in the way of true repentance [אברבנאל].
God's communication with the creature did not involve literal speech. The primary approach among commentators is that God awakened the inner will and spirit of the fish, guiding it toward the shore to set Jonah free. Alternatively, this interaction serves as a metaphor illustrating that God simply compelled the creature to execute His will [אבן עזרא]. During this process, Jonah was transferred from the belly of a female fish, where he had been confined earlier in the story, into a male fish. This transition provided him with a much more spacious environment to reside in following his prayer [מצודת דוד].
To fulfill God's directive, the fish embarked on a massive journey, traveling nine hundred and sixty-five parasangs to reach the coastline [אברבנאל, מלבי״ם]. Acting exactly as God had inspired it to do, the creature expelled Jonah from its mouth [מצודת ציון], delivering him safely onto the dry land [מצודת דוד].