Is it against code to install an extension ring on a 2 1/8" deep 4" square box in new work. I know it is legal in old work, repair or remodel work.
I think you can use extensions in new or existing work. 1999 NEC 370-22 allows extensions and does not stipulate existing or new condition. We see extensions on new work often, such as recessed receptacles at high backsplashes or at back of cabinets, etc. where extensions are needed. 2002 NEC probably reads similar.
Just remember to keep the free conductors long enough to extend the requisite number of inches out of the box. Three inches IMS.
--
Tom H