The wash sale rule and stock compensation
A wash sale occurs when you sell at a loss and acquire substantially identical stock within 30 days before or after. RSU vesting counts as an acquisition.
The trap
Sell company stock at a loss in a month when a tranche vests and the loss is disallowed, added instead to the basis of the new shares.
How to avoid it
Map your vest calendar before harvesting losses, and keep sales outside the 61-day window around each vest and each ESPP purchase.
It applies across accounts
IRA purchases can trigger it too, and in that case the loss is permanently lost rather than deferred.
This article is educational and not tax, legal, or financial advice. Talk to a CPA or tax advisor about your specific situation.