Earlier quoted context omitted.
If you are working in a large corp and not your own side project, that honestly does sound like a bad idea.
Please, elaborate. I can share my screen with coworkers and talk about all sorts of confidential things, and I can even give them full remote access to control everything if I wished. So why would pushing a some plain text code directly to their machine be so fundamentally different than all the other means of passing bits between our machines?
In large corps you usually have policies to not leave your laptop unattended logged in, in the office, that would be potentially even worse than that.