This site isn't set up for hypotheticals. If it were, Jim would need a criminal defense attorney.
NOT LEGAL ADVICE. FOR EDUCATION AND INFORMATION ONLY. DO NOT RELY ON ANY ADVICE YOU RECEIVE FROM ME OR ANY OTHER ATTORNEY IN THIS FORUM. Legal advice comes after a complete review of the facts and relevant documents and an expressed (written) agreement of representation that forms attorney-client confidentiality. Neither of these two events can occur in this forum. Mr. Rafter is licensed to practice in the Commonwealth of Virginia and the US Federal Courts in Virginia. His answers to any Avvo question are rooted in general legal principles--NOT your specific state laws. There is no implied or actual attorney-client relationship arising from this education exchange. You should speak with an attorney licensed in your state, to whom you have provided all the facts before you take steps that may impact your legal rights. Mr. Rafter is under no obligation to answer subsequent emails or phone calls related to this or any other matter.
If he were arrested, he should speak to an attorney. My take is that he is in some fear and paranoia. Drugs can cause an individual to be anxious, irrational and make foolish decisions. I have never seen CIs or undercovers work this way, I seriously doubt that is the case. However, if arrested---he needs an attorney. I take it there is a little more to this story. DO not post anything additional regarding the facts on an open website.
This is not intended as individual legal advice and there is no attorney client relationship established by this answer. It is advisable that you seek individualized legal assistance. This is not a substitute for hiring an attorney.