He went into Ultron and locked out his ethernet connection... or well he locked him from the net to keep him in Skor..kovia (?) and he also have his judgement on Ultron and killed the last one of him after reminding Ultron that he could be being naive as he was born yesterday (loved that line)
I think he is a character who will maybe shine a bit in part 2 if he is returned, he hasn't really had an enemy which he can solo have a battle with, maybe Thanos and him will fight to a more conclusive way and give vision a bit of screen time where he isn't just acting out a child God role. Remember the other films he was in he was battling basically his evil clone and in Civil war he was at the airport scene but what could he really do? vaporize the "rebels" with a single blink, would have been pretty anticlimactic and far darker a tone. Heck.... with a missed shot from him he wrecked War Machine pretty badly.
Meh, locking Ultron out of the internet wasn't really any kind of character moment, it was simply a thing that needed to happen for the sake of the plot, and he was the device that made it happen. Mostly just by telling us he made it happen, as I recall. And killing the last bot....again, meh....we had just got done watching them fall by the hundreds. Letting him get the last one is really just throwing him a bone more than anything.
And he won't be back. They clearly either don't know what to do with him, or don't care to try. At best, they might bring him back in a Jarvis like capacity.