Jeremiah 42:5

Then they said to Jeremiah, The LORD be a true and faithful witness between us, if we do not even according to all things for the which the LORD thy God shall send thee to us.

The remnant left in the land called the Lord to be a true and faithful witness between themselves and Jeremiah, binding themselves under His witness to do everything God would send through the prophet to them. Their pledge was to obey the whole message God would give, with God Himself invoked as witness against them if they failed. The promise was made when the surviving Jews came asking Jeremiah to seek God's direction for them. That asking falls within the history of the two years before Jerusalem fell.

The pledge was unconditional, to obey whatever came through Jeremiah whether it seemed good or bad to them. It was to do all the Lord required, whether they found it pleasing or displeasing. Their words at the time appeared humble and sincere.

Yet the promises were insincere, for their hearts were already set on going to Egypt. They wanted counsel that agreed with their own plans rather than direction that crossed them. Their later refusal to obey showed they spoke as though they meant the promise but did not follow it. They did not keep what they had vowed, but rejected the warning not to go to Egypt and went there against the direction God gave through Jeremiah.