The leaders and the people take an absolute, dramatic oath to obey the prophet's guidance, placing God as the ultimate guarantor of their promise. The group approaching Jeremiah declares that God will serve as a true and faithful witness to their commitment. This means God is not only watching them make this pledge to follow whatever He says, but He is also trusted to act as a faithful judge who will punish them if they fail to keep their word [מצודת דוד].
The scope of this promise is complete and unconditional. While turning to a prophet usually implies a simple request for advice, the people make it clear that they will fulfill God's instructions entirely. They commit to obeying even if His command is to remain in the Land of Israel against their own strong desires [מלבי״ם].
This firm commitment is deeply astonishing. Jeremiah is already recognized as a true prophet, and the people willingly call upon God to witness their unconditional promise to listen. Given this intense level of dedication, it is incredibly puzzling how they ultimately act in the exact opposite manner and break their solemn oath [חומת אנך].