The rule
This is the code's grandfather rule. A system that was legal when it went in doesn't have to be torn out just because a new edition of the code came along.
There are two strings attached. Use, maintenance, and repair have to stay in line with the original design and location, and the system can't have created a hazard to life, health, or property.
Change the design or the location and you're out from under this section. That's an addition, alteration, renovation, or repair under 102.4, and the new work has to meet today's code. Whether something is a hazard is a call the building department makes, and the city's adopted edition of the code has the final word.
On the job
- Like-for-like work is the safe ground: same part, same spot, same design. Move it, resize it, or reroute it and expect it to be treated as new work. Whether a given repair needs a permit is a separate question (see 104.1 and 104.2).
- Walk an older house before you quote a remodel and note anything that could read as a hazard, like sewage seeping at a joint or a relief valve with no discharge pipe.
- Grandfathering covers the old system, not the new work you tie into it. Anything you add or alter has to meet the current code.
The inspector and your city's adopted edition have the final word.