State tax filing

To expand on @MayaD's answer, work income is "sourced" where the work is actually (physically) performed.  Therefore any work you performed in Massachusetts is "Massachusetts-sourced", and taxable by Massachusetts.

 

The general rule is that a state can only tax non-residents on income "sourced" within that state.

**Answers are correct to the best of my ability but do not constitute tax or legal advice.