Note: The DearEsq free 'ask a lawyer' site is offered as a free informational service to the public and is not intended as legal advice. Laws vary from state-to-state, and in addition every situation is unique, and relevant facts may not be known. The answer to the question posed below may not apply to in your state or to your situation. For legal advice in your state and your situation you should consult with an attorney in your state who is familiar with the rules and laws in your state.
Does a building permit issued by a municipality constitute a legal contract for the building inspector and municipality to require any state or federal building codes to be followed by the licensed builder (as building progresses in which municipal building inspectors will conduct timely inspections to see that said rules are followed)?
A building permit is not a contract, it’s a permit. That is, it is the government body giving you permission to do something. However, inspectors are supposed to check that the building is being done to code for independent reasons.