Luckily the head sysadmin knew me and was in the room at the time, and I sheepishly explained by the time I realized it worked it was too late for me to stop it, he seemed understanding, understood it wasn't malicious, and luckily got that what else is a CS department for than for students to learn about this stuff?
That was a great early lesson to never trust code you read online. Even if it is from Microsoft’s own developer portal.
I don't use AI for these. My friends edit/give feedback, so the cycle is slow.
https://www.xda-developers.com/set-up-claude-code-like-boris...
So, the `SessionStart` hook was meant to catch any conversation where the `SessionEnd` hook wasn't fired.
Edit: I do realize a batch job is better. That's what I do now.
I told him it was a risk to let dumbasses like us have a shell on his server. He said we couldn't do anything, that they were unprivileged accounts.
"Watch this", says I, as his machine froze.
I got in so much trouble for that. I hope you can't do that kind of thing any more.