David sent out spies and learned that Saul had indeed come.
The Ziphites stirred up Saul afresh, and he caught at their information like tinder to a spark. How quickly the unsanctified heart vomits up its convictions and returns to its sin. David, meanwhile, acted with true valor by silent retirement into the wilderness, seeking his own safety, not Saul's ruin.
AI summary
Commenting on 1 Samuel 26:1-5
David therefore sent out spies,.... To observe if he was coming or come, and where he was, that he might not be surprised by him; for though David knew the Lord was and would be his protection, he thought proper to be upon his guard, and to make use of means for his safety: and understood that Saul was come in very deed; that he...
David . . . sent out spies . . . and David arose, and came to the place where Saul had pitched--Having obtained certain information of the locality, he seems, accompanied by his nephew (Sa1 26:6), to have hid himself, perhaps disguised, in a neighboring wood, or hill, on the skirts of the royal camp towards night, and waited to approach it under covert of the darkness.