“I know that You can do all things and that no plan of Yours can be thwarted.
The words of Job justifying himself were ended, Job 31:40. After that he said no more to that purport. The words of Job judging and condemning himself began, Job 40:4, Job 40:5. Here he goes on with words to the same purport. Though his patience had not its perfect work, his repentance for his impatience had.
Commenting on Job 42:1-6
Who is he that hideth counsel without knowledge?.... It may be understood, and supplied, as it is by Cocceius, "thou didst say"; as the Lord had said, or to this purpose; see Gill on Job 38:2; to which Job here replies, I am the foolish man that has done it, I own it with sorrow, shame, and confusion: or it may be interpreted as condemning...
I know that thou canst do every [thing], and [that] no thought can be withholden from thee. (a) No thought so secret but you see it, nor anything that you think but that you can bring it to pass.