Yes, you still get the Æmber from Code Monkey, even if its neighbors lose wards instead of getting archived. In this case, the if text only checks whether they are the same house, and not whether they are successfully archived.
Source
I deploy Code Monkey between two creatures of the same house, but both are warded. The wards are removed (so they don't go to my archives), but do I still get 2 Æmber?
Yes, you still get the Æmber from Code Monkey, even if its neighbors lose wards instead of getting archived. In this case, the if text only checks whether they are the same house, and not whether they are successfully archived.