There are several questions in U.S. law. Most likely none of them would provide a criminal defendant with a helpful remedy.
1. Was the attorney-client privilege actually breached?
An attorney is authorized to disclose secrets in the furtherance of a representation, and it isn't clear if this did or did not further the representation. It isn't at all obvious that this did not further the representation because cooperation on points that you can't win on the merits can be an effective negotiation strategy.
If it did not further the representation, it could be a violation of the defense attorneys' professional ethics to make the disclosure, even if no harm could be shown. This could result in a public or private reprimand of the attorney, a suspension of the attorney's license for a period of time, or in an extreme case, disbarment.
2. Did the disclosure constitute ineffective assistance of counsel?
In the U.S., a criminal defendant cannot raise the issue of ineffective assistance of counsel on a direct appeal of a conviction or sentence, but can raise it in a collateral attack on a conviction which must be brought first in the state court and if that remedy is exhausted, may then be brought in federal court.
In many states and all federal courts, this collateral attack is called a "habeas corpus petition." In some states this is done via a post-trial motion in a original criminal case.
For this relief to be available one has to show that the lawyer's conduct was so far below the standard of care for an attorney in this kind of case that it denied the criminal defendant his constitutional right to counsel and that this ineffective assistance caused real harm to the defendant, so that, as a result, the ruling should be overturned and retried from scratch.
Procedurally, a collateral attack on a conviction is tricky and plagued with complex deadlines and procedural rules and there is not a right to counsel for a collateral attack on a conviction.
Ineffective assistance of counsel is often raised and rarely prevails.
As a comment indicated, the basic issue in this case is whether the disclosure actually harmed the client. If the court or DA would have insisted upon a drug test had it not been waived by defense counsel, and the defendant would have failed it if they had insisted, even if the defense lawyer made a mistake, it was probably a harmless error, and relief would not be available. One would have to have shown that a drug test would not have been required prior to sentencing if the defense attorney had objected for ineffective assistance of counsel to be a viable grounds to attack the sentence in this case.
3. Was the disclosure malpractice?
The criminal defendant could also sue the defense attorney for malpractice, but would only prevail if the criminal defendant could show the economic harm that resulted from the conviction and that the defense attorneys' conduct fell below the standard of care for a reasonable defense attorney. Even if there was a breach of the attorney-client privilege, there might not be a valid malpractice case since no damages could be shown.