Cosmi returns as Livorno coach
Cosmi resigned after Sunday's 2-0 home defeat by fourth-placed Napoli, saying his relationship with the president had broken down.
"It wasn't hard to clarify things," Spinelli told Sky television.
"The marriage continues because it's in the club's interest and because of the good job he's done with us, the results we've had."
Cosmi took over the Tuscan side in October when they were bottom after Gennaro Ruotolo's sacking.
They are now 16th, two points above the relegation zone.