Barclay said the next step was an agreed document between both parties by the end of next week.
The ministry's chief executive Andrew Bridgman said "considerable progress" was made during mediation.
"We are finalising the details with the PSA," he said.
"Both parties are committed to working through the final details and getting an offer out to our people."
Last week the PSA's strike action ramped up and included picketing at the Ministry of Justice, just a street away from Parliament in Wellington for the first time during the dispute.
After the Employment Court ordered the parties back to the negotiating table a meeting took place in the capital between Bridgman, the ministry's chief operating officer Carl Crafar, Barclay and the PSA's assistant national secretary Basil Prestidge.
The Employment Court had already been called upon to determine an injunction application by the ministry to stop short-notice "lightning strikes" because of safety concerns.
The court dismissed the application.
Despite losing the injunction bid, Bridgman has maintained his position that the short-notice strikes are "unsafe and irresponsible".
Security concerns due to the strikes were also raised by New Zealand Law Society president Kathryn Beck and New Zealand Bar Association (NZBA) vice-president Jonathan Eaton QC after a brawl in a Christchurch courtroom.
However, Beck and Eaton's comments were met with criticism by other lawyers and the PSA who said the incident was sadly an everyday occurrence in New Zealand's courts.
Prominent defence lawyer Ron Mansfield has also questioned Chief District Court Judge Jan-Marie Doogue's decision to exercise her statutory powers and alter adjournments in response to the strike action.
He said the order was "undermining" the impact of the strikes and made lawyers and the court "complicit with the ministry".
The PSA's industrial action has included work bans, work-to-rule activities and a refusal to serve, check and sign legal documents - leading to a logjam of adjourned cases at the country's busiest courts.
The union seeks an increase in the base pay offer, transition to fair pay scales and removal of the performance pay system, they said.
It also wants to close the gender pay gap.