Does a work permit make me a tax resident?
No. The permit is an immigration document and the tax test is separate: residency follows your ties and your day-counts, so the same permit can leave you resident from arrival, non-resident for the whole period, or resident for part of a year. Payroll will often assume one answer and apply it from the first pay run, which is not the same as that answer being correct. The first-year return is where the assumption is tested against the facts, and it is worth settling your position before payroll settles it for you.
Why is tax deducted when I am not resident here?
Because withholding attaches to the work, not to your status. An employer with an obligation to deduct will deduct from the first pay run, whatever conclusion you or a treaty later reach about residency. That is not an error to argue about at the payroll desk; it is a position to reconcile on the return, where the deduction is set against the tax actually due and any exemption you are entitled to is claimed. Keep every pay statement, because the reconciliation is only as good as the record of what was taken.
Can a tax treaty stop tax on my salary?
Sometimes, but never automatically. The employment article carries conditions covering the nature of the presence, who the employer is and where the cost of the remuneration is borne, and it exempts only where every condition is met on your facts. Meeting most of them has the same effect as meeting none. So the work is to read the article against your contract, your assignment letter and your actual calendar, then claim the exemption on a return with those facts recorded. An exemption assumed and never claimed does nothing for you.
Which return do I file in my first year on assignment?
Usually the one that reconciles three separate things: where your residency landed, whether the employment article exempts any of the salary, and what your employer has already deducted. Those three can each point in a different direction, and the first-year return is the only document that has to make them agree. It also sets the record that later years are read against, so a rushed first filing tends to be corrected later. Settle the residency question first, because the rest of the return is shaped by that answer.
My assignment ended early, was I resident at all?
Possibly not, and the question is worth asking before the return is filed rather than after. Residency turns on ties and day-counts, and an assignment cut short can leave both below the point at which they matter, particularly where a home abroad remained available and a family never moved. The consequence is often a filing that reports the employment income on a non-resident footing and deals there with the withholding taken on the resident assumption. Reconstruct the calendar from boarding passes and the assignment letter before deciding.
Do I have to file in both countries on a work permit?
Frequently, yes, and the two filings have to tell the same story. One country taxes on the basis of your residency there, the other on the source of the employment income, and a treaty decides which of them yields. Where both returns are prepared from one set of facts, the relief claimed in one matches the income reported in the other. Where they are prepared separately by two firms working from two sets of assumptions, they contradict each other, and the contradiction is what draws an examination.
How does the treaty tie-breaker work when both countries say I am resident?
As a sequence, stopping at the first test that gives an answer: where you have a permanent home available; if in both or neither, where your centre of vital interests is; then habitual abode; then nationality; and if all of those tie, the two tax authorities decide by agreement. It is evidential rather than elective — you do not choose your treaty residence, you demonstrate it, which makes the record of homes, family and time the substance of the claim. See tie-breaking dual residency.
How would a foreign tax authority know I am resident there?
Mostly from information you or your bank already provided. Account-opening forms ask you to self-certify tax residence, and that certification is reported between authorities under the Common Reporting Standard or, for US accounts, under the FATCA framework. Beyond that: employer and payroll filings, property registries, immigration records and the tax filings of anyone who paid you. The realistic planning assumption is that the data arrives. See FATCA and information reporting.