First, if they are detained, they will be strip searched long before any torture takes place. You either take it early or not at all - odds are everything will be taken away.
Second, the last thing you want in such situation is ambiguity - people don't just commit suicide willy-nilly. Instructions must be very clear.
Thirdly, either the agent has secret information that cannot be divulged, or they don't. This is known upfront before the mission. Any agent at high risk of capture is kept away from sensitive information, to minimise possible damage. Every spy and reconnaissance organisation work like that. As soon as agent is captured, damage control is put in place.
Lastly, orders to commit suicide are not legally possible.
Aleksandr Ogorodnik was able to get the KGB to give him his pen, which had a suicide pill in it, to write his confession.
https://en.wikipedia.org/wiki/Aleksandr_Dmitrievich_Ogorodni...
You do realize that we're talking about the CIA here, right?
Surely even the CIA has limits on the atrocities they are willing to commit?
We are talking about US citizens for whom this is a job, they are not like foreign prisoners. CIA -agents are 'one of their own'.
This is like Taliban-level stuff
This assumes the others would know that it happened. Who would tell them? Certainly not the guy who complied with the request for suicide.
Obviously you don’t order it. You play up the cruelty of the enemy tortourers. This probably is not hard, every secret service probably have enough nightmare fuel on hand to do if they want to. And then you provide the means and let your agent know they can use it uppon capture.