Hollywood writers and major entertainment studios reached a tentative deal late Monday night, halting a strike that would’ve begun Tuesday. The 9,000-member Writers Guild of America and the Alliance of Motion Picture Television Producers evidently found common ground at the last minute after a long week of tense negotiating. The agreement specifically dealt with an increase in television residuals, the Guild’s health-insurance plan, and provisions for shorter television seasons—the last of which has led to a drop in earnings for writers. Over the past few years, the Guild said its members have suffered an average decrease of 23 percent in earnings, as streaming services cut the typical number of episodes in a season down from 22 to around 10. “Did we get everything we wanted? No. Everything we deserve? Certainly not. But because we had the near-unanimous backing of you and your fellow writers, we were able to achieve a deal that will net this Guild’s members $130 million more, over the life of the contract, than the pattern we were expected to accept,” the Guild said in a memo to members early Tuesday morning.