I need to share this cautionary tale because it cost me $2,000 in tax savings, and I bet I’m not the only one who’s made this mistake.
The Setup
I’m on the FIRE journey (targeting retirement in 8 years at age 43), and I track everything in Beancount. One of my key tax optimization strategies has always been tax-loss harvesting—selling losing positions to offset capital gains and reduce my tax bill.
In December 2025, I noticed my VTI (Vanguard Total Stock Market ETF) position in my taxable brokerage was down about 12% from my purchase price. Perfect opportunity! I had $67k in capital gains from selling some winning tech stocks earlier in the year, so I figured I could harvest $8,000 in losses from VTI to offset those gains. That would save me roughly $2,000 in taxes (at 24% federal + state).
The Plan (That Failed)
My strategy seemed solid:
- Sell $65k of VTI at a loss on Dec 15, 2025
- Immediately buy $65k of VXUS (Total International) to stay invested
- Wait 31 days (to clear the wash sale window)
- Buy back VTI on Jan 16, 2026
- Claim $8k loss on my 2025 tax return
I executed steps 1-4 perfectly. Or so I thought.
The Wash Sale Violation I Didn’t See Coming
Fast forward to tax prep in March 2026. I’m reviewing my 1099-B and notice something weird: my VTI sale shows a “wash sale disallowed” adjustment. My $8k loss? Completely disallowed.
I was confused. I checked everything:
Waited 31 days before buying VTI again (no violation there)
Didn’t buy VTI in my taxable account during the 30-day window
Didn’t buy VTI in my Roth IRA (I don’t hold it there)
Then it hit me: My spouse’s 401k.
Her employer 401k has automatic biweekly contributions, and one of the fund options is a total stock market index fund that’s basically identical to VTI. On Dec 28, 2025—just 13 days after I sold VTI—her 401k auto-purchased $847 of this fund.
That single $847 purchase in her 401k disallowed my entire $8k tax-loss harvest. The IRS wash sale rule applies across ALL accounts in your household, including:
- Your spouse’s IRAs
- Your spouse’s 401k
- Your own 401k
- Your Roth IRA
- Any account with your name on it
I had no idea. Cost: $2,000 in extra taxes.
My Beancount Solution
I rebuilt my tracking system to prevent this from ever happening again. Now I:
1. Track All Holdings Across All Accounts
I have separate Beancount account trees for each account type:
Assets:Brokerage:Taxable:VTI
Assets:IRA:Traditional:VTI
Assets:IRA:Roth:VXUS
Assets:401k:Mine:VTI
Assets:401k:Spouse:TotalMarket
2. Use Security Metadata Tags
Every transaction gets tagged with the security identifier:
2025-12-15 * "Sell VTI for tax-loss harvesting"
Assets:Brokerage:Taxable:VTI -1000 VTI @@ 65000 USD
Assets:Brokerage:Taxable:Cash 65000 USD
@security:VTI @tax-strategy:harvest @wash-sale-check:required
3. Run Pre-Sale Wash Sale Queries
Before ANY tax-loss harvesting sale, I run this Beancount query:
SELECT date, narration, account, position
WHERE any_meta('security', 'VTI')
AND date >= 2025-11-15
AND date <= 2025-12-15
This shows me every VTI (or substantially identical) purchase in the 30 days BEFORE the planned sale across ALL accounts.
4. Set Calendar Reminders
After selling, I create a 31-day calendar block: “DO NOT BUY VTI IN ANY ACCOUNT UNTIL [DATE]”
I even emailed my spouse’s HR to pause her 401k contributions for 31 days (she was able to skip one payroll cycle).
Questions for the Community
-
How do you track wash sales across multiple accounts in Beancount? Do you use metadata tags like I do, or a different approach?
-
What counts as “substantially identical”? If I sell VTI, is buying SCHB (Schwab Total Market ETF) safe, or would IRS consider that substantially identical since it tracks the same index?
-
How do you handle spouse’s accounts? Do you track your spouse’s 401k/IRA in your own Beancount file, or maintain separate files?
-
Any automated solutions? Has anyone built scripts that automatically flag potential wash sale violations before you execute trades?
This mistake was expensive, but I learned my lesson. Now my Beancount setup is wash-sale-proof. I hope sharing this saves someone else the $2k penalty I paid.
TL;DR: Tried to harvest $8k in losses, forgot about spouse’s 401k auto-purchase, IRS disallowed entire loss, paid $2k extra in taxes. Now I track ALL accounts in Beancount with metadata to prevent wash sale violations.