Can I tax loss harvest stocks sold in my HSA and IRA accounts?

I sold some stocks at a big loss in my HSA and IRA accounts. Can I claim the capital losses for these transactions and loss harvest to offset some of my taxable income in any way?