Replacing old windows with new ones requires a permit. According to the International Code Council & Washington State Building Code Council the Moisture Barrier/Flashing needs to be inspected for correct installation to prevent moisture from entering the wall.