Drug-addict Tracy Lee Brannigan was "absolutely flying" in the hours before she died in custody from a heroin overdose.
Then she had a "drug party" in her cell, her Sydney inquest has heard.
On the afternoon of February 24 last year, Brannigan was locked down in a high-risk cell at Dillwynia Women's Correctional Centre on Sydney's outskirts.
The following morning her cell mate says she woke at 5am to find the convicted Wollongong drug dealer slumped over on the floor dead.
Brannigan's inquest is trying to work out whether Corrective Services NSW and Justice Health breached their duty of care by putting her in the unsupervised "high needs" cell with another known drug taker.