It appeared that Jeremiah was not committing an offense in the sight of God, by not disclosing the whole truth to the officials, who were seeking his life. Jeremiah's account is similar to Samuel's (1 Samuel 16:1-5). In fact, it was the Lord Himself who advised Samuel not to tell the whole truth in that situation:
The LORD said to Samuel, "... Fill your horn with oil, and go. I will send you to Jesse the Bethlehemite, for I have provided for myself a king among his sons." And Samuel said, "How can I go? If Saul hears it, he will kill me." And the LORD said, "Take a heifer with you and say, 'I have come to sacrifice to the LORD.'" (1 Samuel 16:1-2)
In his discussion of the Ninth Commandment (Systematic Theology - Volume III, Chapter XIX The Law), theologian Charles Hodge writes,
Examples of this kind of deception are numerous in the Old Testament. Some of them are simply recorded facts, without anything to indicate how they were regarded in the sight of God; but others ... received either directly or by implication the divine sanction.
... the principle [is] that a higher obligation absolves from a lower [one]. It is a dictate even of the natural conscience. It is evidently right to inflict pain in order to save life. It is right to subject travellers to quarantine, although it may grievously interfere with their wishes or interests, to save a city from pestilence.
The question ... is not whether it is ever right to do wrong, ... nor is the question whether it is ever right to lie.
The obligation to speak the truth is a very solemn one; and when the choice is left a man to tell a lie or lose his money, he had better let his money go. On the other hand, if a mother sees a murderer in pursuit of her child, she has a perfect right to mislead him by any means in her power, because the general obligation to speak the truth is merged or lost, for the time being, in the higher obligation.
(Note that the quotes do not necessarily appear in sequential order in the original source.)