The prohibition against ḥametz on Pesaḥ is unique in that it is not only forbidden to eat it, but it is forbidden even to keep; whoever keeps it in his home violates the two prohibitions of bal yera’eh and bal yimatzei.
The Torah’s language, “no ḥametz of yours shall be seen, and no se’or of yours shall be seen within all your borders” (Shemot 13:7), shows that there is no prohibition against a Jew having a gentile’s ḥametz or ownerless ḥametz in his domain. It says “of yours” – you are not allowed to see ḥametz that belongs to you specifically, implying that the ḥametz of gentiles and ḥametz that is ownerless are permissible.
Therefore, if a gentile lives in a Jew’s courtyard, even if the gentile works for the Jew, the Jew does not have to eliminate the gentile’s ḥametz. Likewise, if a gentile deposited ḥametz in a Jew’s house for safekeeping before Pesaḥ, the Jew need not clear it out, as long as he is not responsible for the ḥametz. However, he must erect a partition at least ten tefaḥim (handbreadths) high in front of the ḥametz, to make certain that he does not forget and eat of it (SA 440:2). Alternatively, he may lock it up and hide the key, or close it in a cabinet and tape the doors shut, so that if someone opens them, he will be reminded of the prohibition against ḥametz.
A Jew may also permit a gentile enter his home on Pesaḥ, carrying his ḥametz with him. It is forbidden, though, for the Jew to eat with the gentile at the same table, lest the Jew forget and eat of the gentile’s ḥametz. Even if he puts something on the table to remind himself not to eat from the gentile’s ḥametz, he may not eat with the gentile at one table, lest a crumb of ḥametz may get mixed into the Jew’s food. Once the gentile has finished heating, the Jew may clean the table thoroughly of all the ḥametz crumbs and then eat there (SA 440:3; MB ad loc. 18).