A former state court system official who accidentally butt-dialed a Post reporter while telling friends, “I barely show up to work” has dodged prosecution over his admitted scam on New York taxpayers — but it’s still likely to cost him.

State officials plan to punish disgraced Office of Court Administration spokesman David Bookstaver by slashing his retirement benefits, The Post has learned.

Manhattan District Attorney Cyrus Vance Jr. declined to file charges against Bookstaver for playing hooky from his office in downtown Manhattan, a spokesman said.

“Following an extensive review of relevant documentation and electronic records, as well as interviews with relevant parties, our office determined that there was insufficient proof to establish that Mr. Bookstaver acted with criminal intent,” spokesman Danny Frost said.

A source close to the investigation said that part of the difficulty in proving the case was OCA’s sloppy bookkeeping, and that Bookstaver’s supervisors had signed off on the no-show job.

But an internal probe did determine that there were discrepancies between where Bookstaver said he was and his actual location while on the clock, the source said.

OCA investigated the number of days Bookstaver actually worked before he was fired last year, and the state Comptroller’s Office will use the results to penalize him financially, a spokeswoman said.

OCA withheld a lump sum of $26,500 in unused vacation days, which he will likely have to relinquish.

“The forfeiture of annual leave, along with the subsequent penalties that will be incurred in the calculation of his pension, is an appropriate resolution to a serious issue that has been addressed,” said OCA spokesman Lucian Chalfen.

Bookstaver, 60, is currently pocketing $5,508 a month in pension payments, which Tania Lopez, a spokeswoman for state Comptroller Thomas DiNapoli, called “an estimated pension based on the information that his employer previously reported.”

Neither OCA nor DiNapoli’s office would say how much unused vacation Bookstaver racked up during his 21 years as a spokesman for the state court system.

Bookstaver was earning $166,733 a year in August 2017 when he inadvertently butt-dialed his cellphone, leaving The Post a four-minute voicemail that confirmed the accounts of sources who said he’d been appearing at his office as little as two days a week for 18-plus months.

The incriminating message captured Bookstaver confessing to at least two pals how “the story’s true.”

“I’m not doing anything. I barely show up to work and I’ve been caught,” he said to laughter.

He predicted The Post’s story could get him fired but it “would probably affect my pension check by $6 a month.”

He was canned hours after the story was published, less than seven weeks before his planned retirement.

Bookstaver was able to hang on to his pension because he was hired before a 2011 ethics law that lets the state strip crooked officials of their retirement benefits.

A source said Bookstaver’s misconduct led to many reforms at OCA, including the scrapping of alternate work schedules, which are difficult to track, and tightening company car policies.

Last year, Albany County Comptroller Michael Conners and state Assemblyman Steve McLaughlin (R-Rensselaer County) called on New York state Chief Judge Janet DiFiore to seek repayment of $149,400 from Bookstaver.

Conners is outraged that the Manhattan DA chose not to pursue a criminal case.

“This is the same DA that gave Harvey Weinstein a free pass the first time around,” Conners said. “There is a culture of corruption within the justice system in New York state and if the Manhattan DA goes after Bookstaver, they’ll also have to go after the judges who were complicit in his conduct, and they don’t want do that.”