Authorship: It is very important that each student develop as an author of her code.
Never touch a student’s keyboard. Instead, sit with the student and guide her in what to do. It can be helpful to bring another laptop, increase the font size, and type out code for the student to copy. It’s also great to have portable whiteboards or writable desk surfaces, so you can develop pseudocode together that then stays with the student. (The only exception would be if there is some error at a deeper level than the student would be expected to know about, eg incompatible package versions installed.)
For problem sets, students should never look at each others’ code. They may work on problems together, using pseudocode and diagrams. This is going to be a challenge, because pair programming might be very productive during labs and group projects.