Huldah the prophetess tells of the forthcoming desolation of Judah but prophesies that Josiah will not have to witness it.

2 Chronicles 34:22–28

22 And Hilkiah, and they that the king had appointed, went to Huldah the prophetess, the wife of Shallum the son of Tikvath, the son of Hasrah, keeper of the wardrobe; (now she dwelt in Jerusalem in the college:) and they spake to her to that effect.
23 And she answered them, Thus saith the Lord God of Israel, Tell ye the man that sent you to me,
24 Thus saith the Lord, Behold, I will bring evil upon this place, and upon the inhabitants thereof, even all the curses that are written in the book which they have read before the king of Judah:
25 Because they have forsaken me, and have burned incense unto other gods, that they might provoke me to anger with all the works of their hands; therefore my wrath shall be poured out upon this place, and shall not be quenched.
26 And as for the king of Judah, who sent you to inquire of the Lord, so shall ye say unto him, Thus saith the Lord God of Israel concerning the words which thou hast heard;
27 Because thine heart was tender, and thou didst humble thyself before God, when thou heardest his words against this place, and against the inhabitants thereof, and humbledst thyself before me, and didst rend thy clothes, and weep before me; I have even heard thee also, saith the Lord.
28 Behold, I will gather thee to thy fathers, and thou shalt be gathered to thy grave in peace, neither shall thine eyes see all the evil that I will bring upon this place, and upon the inhabitants of the same. So they brought the king word again.

Jerrie W. Hurd wrote:

“[Huldah] was the wife of Shallem; her family were the keepers of the king’s wardrobe. In addition to those responsibilities, Huldah regularly received petitioners and gave counsel to those desiring to inquire of Jehovah.

“While renovating the temple, the high priest of King Josiah found a manuscript containing religious law. Wondering about its authenticity, he read parts of it to the king. Being disquieted by the message contained in the writings, the king sent both his high priest and his chief scribe to ask Huldah if the manuscript truly contained the word of God. (Note that he did not request that she appear before him, but that he respectfully went to her for advice.)

“Questioned as a prophetess, Huldah answered as a prophetess. She attested to the authenticity of the scroll, part of which is found in Deuteronomy, and went on to prophesy, in the name of God, that Jerusalem would be destroyed because the people had forgotten and disobeyed the laws contained in that manuscript. Her personal message to the king was kinder. Because he had humbled himself in the sight of God, he was promised that he would be gathered to his fathers before her prophecy came to pass.”

(Our Sisters in the Bible [1983], 45.)