Do I have to file in both Canada and the US in the same year?
Frequently yes. Working in the United States on a work visa while keeping Canadian ties commonly makes you taxable in both countries on the same employment income for the same year, and neither filing removes the other. What the federal treaty does is decide which country may tax what, and give a credit so the same income is not taxed twice over. That relief is claimed on a return. So the practical answer is two federal filings that have to agree with each other, plus whatever the state requires on its own rules.
Does the Canada US treaty protect me from state tax as well?
No, and this is the part that catches people. The treaty binds the two federal governments. States write their own residency and sourcing rules and are not obliged to follow a federal treaty position at all, so income the treaty allocates one way can still be taxed by a state on its own test. The state analysis is therefore a separate exercise with its own conclusion, run alongside the federal one rather than derived from it. A file that looks only at the two federal returns is an incomplete file.
Which country taxes my US salary first, Canada or the US?
Ask instead which country has the primary claim on that income under the treaty, because the credit mechanism depends on the answer. Employment income is generally allocated to the country where the duties were performed, and the other country, typically the one where you remain resident, allows relief for the tax the first one charged. The practical consequence is the order of preparation. The return carrying the primary charge is prepared first, because its final figure is an input to the credit claimed on the other. In the wrong order you prepare one of them twice.
How do I avoid paying social security contributions in both countries?
Through a different instrument. Social security is not dealt with by the tax treaty but by the totalization agreement between the two countries, which decides which system a worker contributes to and prevents contributions to both on the same earnings. It is claimed with its own documentation, obtained through the relevant authority, and a payroll department will keep deducting until it sees that document. Because it sits apart, it can be missed entirely on a file where the tax side was handled carefully, so it is worth raising explicitly rather than assuming the treaty covered it.
I moved to the US mid-year on a TN visa — what do I file?
Start by settling residency for each country across that year, because the filings follow from it and not the other way round. A move part-way through a year commonly produces a period in each country and a return in each, with the employment income divided by where the duties were performed rather than by where the salary was deposited. Then run the state question separately. In that order — residency, sourcing, credit, state — each step has one answer. Beginning instead with the forms means revisiting all four.
My US employer kept withholding state tax after I left the state — now what?
This is a state matter rather than a treaty one, and it is resolved on that state own rules about residency and where work was performed. Two things need doing. The payroll record has to be corrected so the deduction stops, which usually needs evidence of where you now live and where the duties are actually carried out. And the amounts already deducted are recovered from that state by filing for the year on the basis that the income was not its to tax. Keep the evidence of your working location, because it decides both.
Would a state exit tax even be constitutional?
A levy imposed purely for leaving would face serious challenge under the constitutional protections for interstate commerce and the right to travel, which is part of why proposals stall. But that is not what most states are doing. Taxing income that was earned or sourced within the state before you left is conventional, long upheld, and where almost all real disputes sit — which is why the useful question is sourcing and domicile, not constitutionality. See state non-resident returns.
Do dual citizens have to file US taxes if they live abroad?
Yes. US filing follows citizenship, not residence or where the income arose, and the obligation continues for as long as the citizenship does. Two further obligations travel with it and are keyed to account balances rather than income, so they can apply in a year with no US tax at all: the foreign bank account report to FinCEN, and the specified foreign asset statement with the return. Most people who discover a problem discover it there. See two returns as a dual citizen.