Question: Can a soldier be court-martialed for revealing intelligence while in duress? Let's say a soldier is captured and then tortured by Russian agents to reveal critical top-secret intelligence to the Russian government. Can the soldier be then court-martialed in the U.S. for treason or some other crime?

Answer: 
While the basic answer has already been given it's worth noting the Constitution [says](https://constitution.congress.gov/browse/essay/artIII_S3_C1_1_2/) the following about treason:

> 
> Treason against the United States, shall consist only in levying War against them, or in adhering to their Enemies, giving them Aid and Comfort. No Person shall be convicted of Treason unless on the testimony of two Witnesses to the same overt Act, or on Confession in open Court.
> 
> 
> 

It seems pretty clear based on the various [articles](https://www.criminaldefenselawyer.com/resources/treason.htm) I've read that SCOTUS would probably read that provision as not including aid given under duress (wouldn't be surprised if it's even in an opinion somewhere) so not only can you not now but Congress likely couldn't even change the law to make giving info under duress treason.

Of course, someone could always argue that the duress was merely for show or the like.
Convictions are automatic if intelligence is shared, but courts-martial tend to take a dim view of soldiers who succumb to duress. The case of [Bowe Bergdahl](https://en.wikipedia.org/wiki/Bowe_Bergdahl), a U.S. soldiers captured and tortured by the Taliban, and then convicted in a court martial after he was returned to U.S. forces, is a case in point.