A tax home is generally considered to be the place where an individual primarily conducts their business or employment activities. It is the location associated with their regular or principal place of work. When someone temporarily works in a different location for a limited period, it doesn't necessarily change their tax home.
In Stefan's case, even though he has taken a contract job in San Francisco for 8 months, his tax home would likely still be Los Angeles if he intends to return to Los Angeles after completing the contract and continue his regular work activities there. Temporary work assignments away from one's tax home are generally considered temporary and don't change the tax home.
However, if Stefan were to establish a new permanent residence in San Francisco and intend to continue working there indefinitely after the contract job, then his tax home might shift to San Francisco.
It's important to note that tax home determination can be a complex issue, and it depends on various factors, including the individual's intent, the duration of the assignment, and other circumstances. Consulting with a tax professional or accountant is advisable to ensure proper tax treatment in such situations.