Do I need a permit to replace a roof?

The honest answer is "it depends on the building and the city," but Seattle's rule is clearer than most people expect, and it's the one most of this county's readers will hit first.
Seattle's rule
The city's permit office does not require a re-roof permit for one- and two-family homes and townhouses as long as the work changes nothing else about the building beyond insulation that's equivalent to or better than what was there. A straight tear-off and reshingle on a Seattle house is normally permit-free.
Two cases change that. Any reroof that alters the building itself beyond insulation needs a construction permit. And on commercial and multifamily buildings, replacing the roof cover, sheathing, or insulation, or repairing more than 500 square feet, needs a re-roof permit because the work has to meet energy-code insulation standards.
Every other city is its own answer
Seattle's exemption is Seattle's. Bellevue, Kent, Renton, and the rest of the county each run a permit office with its own thresholds, and unincorporated spots like Vashon answer to the county, and the right answer for your address is the one your city publishes or the roofer knows from filing there. When the callback happens, ask two questions: does this job need a permit in my city, and if it does, do you file it? Filing is routinely part of the roofer's scope on jobs that need one.
Why it matters to ask
A permit puts the work on record with the city, and jobs big enough for a full construction permit also get an inspector's eyes on them. Unpermitted work that needed a permit surfaces at sale time or after a leak, and fixing the record costs more than the permit would have. A five-minute question on the callback settles it.