wwhitney
REGISTERED
Zoning likely uses its own definitions rather than relying on the building code; you'd have to check your particular zoning code and parse its definitions. It is possible for a structure to be an ADU for the zoning code, but not a dwelling for the building code, for example.So if zoning does not allow 2 separate dwelling units on a lot, and ADU is not permitted?
A structure with just a bedroom is not a dwelling, see the IRC definitions of "dwelling" and "dwelling unit".So even just a bunk house - a bedroom by another name - is not in your view and accessory structure
So an important question is whether your treehouse will actually be a "dwelling" or not. If it doesn't meet the definition of "dwelling" then I agree it's an accessory structure, building code wise.
Cheers, Wayne