I believe it’s called “Acting in concert”. Just don’t commit any crimes and you will be fine.
I remember a case in TX many years ago. A guy robs a bank kills the guard, gets in the getaway car driven by an accomplice. Both of them met Sparky for the murder.