Is it code compliant to run only a hot wire to a relay used as a 3-way switch?
Your relay-on-a-switch-loop is fine in general...
Your relay-on-a-switch-loop turns out to be up to Code after all -- NEC 300.3(B) only requires the neutral (&quot;grounded conductor&quot;) to be in the same conduit as the hots if it's necessary to route the neutral to a location to begin with (note that the wording about &quot;grounded conductor&quot; is prefaced with &quot;where used&quot; in the Code section in question), and in your case its not, as 404.2(C) point 1 is satisfied as long as there's enough spare space in the conduit to pull a neutral thru it later if need be.
But there are a couple of sticky points with your arrangement
However, your plans do have a couple of potential snags in them.  First off, in your project box, you'll need to be very careful about line-voltage/low voltage separation if you want your control circuit to be Class 2 instead of Class 1.  This will include using a relay capable of providing high/low voltage separation while switching a 15A tungsten or ballast load such as a RIBT24Z (you could use a RIBT24B, but that limits you to 10A of tungsten load), as well as having a barrier inside your project box between high voltage and low voltage wiring; in fact, I would screw a 4&quot; square junction box to the side of your project box and use that to contain the mains wiring and mount the relay, thus keeping all that nasty mains wiring safely out of your low-voltage project box to begin with.  Note also that you don't need the NC contacts of the relay here, so you only have to route two wires through your conduit, not three.
The other issue is that while your three-way switch setup will work for what you're doing, it's not often done due to the inability for a local operator to guarantee the load stays in a known state with the wiring you have.
In general, what's normally done in this situation is called a HOA (Hand, Off, Auto) switch; while not generally available in familiar wallbox form, it's still possible to pull off.  This is done by replacing the existing switch with a DPDT, center off, maintained contact switch such as a Leviton 1281, and use one side as &quot;Hand&quot; (with an always-hot feed) and the other side as &quot;Auto&quot; (fed from the relay-switched hot).  You'll have to supply the labeling yourself, but this is probably the best solution for your application as it doesn't limit the load on the circuit any more than the relay does as well as fitting normally into a multi-gang junction box and faceplate. (A 20A circuit can use a Leviton 1284 instead.)
(The more typical &quot;industrial&quot; solution would be to use a 3-position selector switch; while a 22mm selector can be mounted into a junction/gang box using a faceplate with a 1/2&quot; trade size knockout in it, such faceplates are not available in multigang configurations, and 22mm selector switches have pilot duty contacts on them, which means they're rated for much lighter loads than 15A of tungsten or ballast lighting.  One could use a SIB02S from Functional Devices, but the form factor of that part isn't right for your application as it provides its own hub-mounted box.)