Have a question, I work at Autozone, and I do a lot of work on my own vehicles. I change batteries at work a lot, and something I've noticed a lot of Toyotas do, is the first startup with a new battery, it starts and then shuts right back off. Then, on the second startup, it starts and runs normally. I'm trying to figure out why it happens so that I can explain it to my customers. Any insight would be greatly appreciated. Big fan of the show Scotty!
My Toyotas never do that. True, after battery change, shutting off might be part of ECU sequence reverting to "factory default" until it picks up new data that allow software to re-set to "driving style" in 1-2 days. Another explanation: badly clogged IACV will cause engine to shut off. You're not alone: https://forums.anandtech.com/threads/toyota-is-insane-engine-shuts-off-after-ignition-after-changing-batteries.2263581/
May be computer learning?