‘If the Secret Keeper wishes to do so, they may divulge the information at any time (although the secret cannot be forced, bewitched or tortured out of a Secret Keeper who does not wish to give up their secret; it must be given voluntarily’ -JK Rowling on Pottermore
Lowkey one of the most heart wrenching things posted on Pottermore imo, because James and Lily knew. I’m sure James’s mind scrambled for an excuse or reason or alternate explanation as to why one of his best friends would voluntarily gave up their whereabouts, because thats just in his nature, but I honestly think that deep down he had to have known the truth. That there was no other explanation other than Peter, his best friend and fellow marauder, who he had grown up with and joked with and pulled pranks with sat through hundred of detentions with and teased and comforted and trusted with his life had, for whatever reason, wanted to divulge their location. And I think it makes James Potter’s final moments 1000x sadder.