From what we "know" right now, the Octobot is sans
master, since Peter had been controlling it by virtue of being in Ock's body (and likewise, Ock had previously controlled his various Octobots through brain wave transmissions or whatever, and no longer could once in Peter's body). But you do raise the big question.
We didn't see the Octobot transfer Ock's imprint into Peter's body in the first place (when it happened, it was off-panel and only later depicted). So, in like fashion, I'm currently assuming that Peter-in-Ock had the Octobot return to his body after the failed attempt to transfer his own imprint back into his body, while everyone was too focused on the Spidey/Ock fight/talk - and that, before finally dying, he transferred his full consciousness (whatever that would be, compared to an "imprint"*) into the bot, turning the bot itself into his new body.
That said, I'm hoping that Slott (or whoever is writing the book by then) finds a different and unexpected method to bring Peter back. It'd be boring if our two likeliest possible answers right now end up being one of the options that is ultimately used a year or two down the road when this SpiderOck storyline wraps up and Peter returns.
(* I honestly have no idea what the distinction is supposed to be vis a vis
"consciousness vs imprint," but there seems to be one since the Octobots were portrayed as being controlled by a consciousness inside a body even when carrying someone's imprint. An imprint alone apparently wasn't enough to "drive" the bots.)