Tracy Brannigan, pictured alongside her son, died in prison in February 2013.
A female prisoner just three months shy of possible release was able to hold a "drug party" in her cell that turned fatal, an inquest has heard.
Mother-of-two Tracy Brannigan's death has exposed "callous indifference" in the prison system and a staggering flow of drugs into jails, prisoner advocate Brett Collins said ahead of the two-day inquest.
Brannigan, a career criminal and long-term drug addict who had expressed a desire to turn her life around, was able to freely obtain and use drugs, which were sometimes thrown over the fence of the semi-rural prison near Windsor.
Officers in Dilwynia Correctional Centre were aware of her continual drug use and had placed her on "sanctions", yet kept her in a "high needs" cell with another known drug taker, the inquest heard on Tuesday.
Detective Inspector Gary Jones said he believed Brannigan and her cellmate Lauren Ironside were in a relationship, and Ironside gave Brannigan drugs in return for sex and protection.
On the evening of Brannigan's death, the pair had a "drug party" involving prescription drugs and heroin, Detective Inspector Jones said.
Ironside fell asleep at some point in the night and woke at 5am to find her cellmate slumped on the floor.
Four syringes were found in a shampoo bottle and Detective Inspector Jones believes Brannigan made an "error of judgement" and accidentally overdosed.
The inquest will examine whether Corrective Services NSW and Justice Health breached their duty of care by placing her in the unsupervised "high needs" cell, allowing her to continually abuse drugs and not giving her adequate treatment.
Her last visitor, prisoner advocate Kat Armstrong, is expected to tell the inquest that Brannigan was clearly under the influence of drugs on the last afternoon she was seen alive.
After the visit, she was taken back to her cell with little supervision or medical care, the inquest heard.
However, two correctional officers denied she was high during the visit, saying she appeared happy, buoyant and responsive.
Brannigan's death has led to calls for a systematic overhaul of the prison system to stop the free flow of drugs.
Public Interest Advocacy Centre solicitor Jane Leibowitz, who is representing Brannigan's family, said there needed to be better drug detection, better staff training and a stronger focus on therapeutic programs for drug addicts rather than custodial sentenced.
Outside the court, Mr Collins said Brannigan's mother, Sandra Kelly, and partner, Jinx D'Amico, had been devastated by Brannigan's death.
She had repeatedly expressed interest in working on prisoner advocacy with Justice Action and was a delegate on an inmate development committee.
She wanted to complete a business degree but was not given permission and had been refused access to education classes and computers.
"Tracy will never be able to achieve all her ambitions," he said.