Ask questions and get answers from experienced industry professionals
Definitely before you do the roof, masonary work and any flashing around the chimney should be done prior to starting on the roofing.
Masonry work first. Best, Ken
The masonry work should be performed prior to repairs to the existing roofing, unless the roof is leaking, whereupon you may need to make intermediate repairs to stop the leaking while the masonry work is performed.
Each case is unique but in general, the chimney should be done first. Special attention should be paid to the roof flashings around the chimney. If the flashings are behind the stone then make sure they extend far enough into the shingles so the new roof can be flashed properly. If the flashings are surface mounted and there is a counter flashing then the roofer should have no problem making the chimney base watertight
It is always better to repair the chimney prior to any roofing work. This way the new roof doesn't get damaged.
Our recommendation would be to do the massonry work first and then roofing for a few different reasons.
1.This gives the masons freedom to step and walk on the roof without causing damage to the new shingles.
2. You will want to make sure the new flashing that is intstalled around the chimney is installed correctly, accounting for any masonry changes and is not damaged due to installation.
3. Ultimately, that the new roof is not damaged and that the warranty does not get voided.
You can proform both jobs at the same time if you are good at what you do. I have in the past grinded a Grove in the brick chimney all four sides then used a brake to bend a little half inch lip on the top of my flashing metal flashing into massonary Grove then caulked you will never ever have to worry about again in your lifetime Only reason I did massonary work first is because I didn't want to get my shingles all dusted.
What did you decide to do then? Following the proper process would help.