chicago Manual of Style: "When the clauses of a compound sentence are joined by a conjunction,
a comma is usually placed before the conjunction unless the clauses are short and closely related." 5.30.
Your example, with the subject understood in the second sentence is a compound sentence.
The text goes on to say that "In contemporary writing, the comma is often omitted, but this open style should be followed only when there is little or no risk of misreading."
In other words, either way would probably be correct.