Ms Tolley said today that there was "an exceptional combination of circumstances" in the case, including "the nature and record of offending, availability of beds and the weather".
"I'm advised there was a significant risk to the safety of CYF staff in this case, and I would expect the agency to take any necessary precautions to ensure the safety and security of staff and young people," Ms Tolley said in a statement.
Youth justice residences are being investigated by an independent panel which is advising Ms Tolley about an upcoming overhaul of CYF.
"The panel will provide advice on whether there are more effective options , perhaps in a community setting, for some of the young people held in these residences," Ms Tolley said.
"In its interim report the panel makes it clear there is an over-use of custodial remand - it forms 73 per cent of total admissions to youth justice residences, but 75 per cent of the young people remanded go on to receive a non-custodial sentence at Youth Court."
Jacinda Ardern, Labour's spokeswoman for children, said the problem of capacity at residences was not new, and it what had happened to the young woman was unacceptable.
"To have a young person kept in that situation for four days is unacceptable, and just should not have happened in the first place. Police cells are not designed to hold adults for long periods of time, let alone children.
"To learn that they don't have available beds for young women, it seems extraordinary, given it is well known in the sector that there is a growing number of girls falling into the category of needing to come into care and protection because of criminal behavior."
A judge has blasted CYF for taking so long to find the girl a bed and questioned whether the agency was meeting its legal obligations for young people.
Judge Lisa Tremewan said the situation "frankly needs to stop".
Under the law, youths can be held in police custody only if the court is satisfied they are likely to abscond or be violent or if CYF does not have suitable facilities to detain them. CYF must try to find a bed for them at a youth facility.
The 16-year-old girl, who cannot be named for legal reasons, was arrested for the first time in May and charged with common assault, resisting arrest, possession of utensils for cannabis and disorderly behaviour. On September 10, she was arrested for breaching bail.
Her lawyer, Jenny Verry, said she had been recently diagnosed with attention deficit hyperactivity disorder (ADHD) and that was behind much of her alleged offending.
After the teenager's arrest, she was taken to the Henderson police station. CYF was notified, but as there was no bed available in the Auckland youth justice facility, she had to stay put.
The girl said: "It was shit. I felt like I was going to die. I was cooped up for four nights."
When the girl appeared in the Waitakere District Court on September 14, Judge Tremewan was disturbed to hear she was still in police custody.
"In my view this is unacceptable," she said. "I am very concerned that you have been at the police station since last Thursday night. That is not a suitable arrangement for you. I would have thought that something suitable would have been arranged by now."
The judge ordered CYF to find the girl a bed "immediately".
"In my view, the department needs to meet its statutory obligations to ensure that appropriate arrangements are made for female youth as well as male youth, particularly given this is the biggest city in the country. I am aware that it has been an issue in some other cases."
Those cases include at least four other teenage girls held in cells due to a lack of youth justice beds; one of them was pregnant.
" ... it frankly needs to stop," Judge Tremewan said.
Mrs Verry said sending girls out of Auckland was "a huge problem" and a rise in female offending was partly to blame. "There's not enough beds committed for them. It's really unfair."
CYF residential and high needs services general manager Nova Salomen said there was "flexibility around gender allocation of beds when the need arises".
"We monitor the gender allocation over time and modify it according to demand and trends," she said.
"Both male and female young people have to move due to operational requirements.
"If we have to move them away from their community it is for the shortest possible time ... This is the reality of operating a national service in a small country. However, we have the young person's interests front and centre."
Ms Salomen said it was "unfortunate" the 16-year-old had had to be held in the cells.
"That would not have been our choice. However, she was visited daily by a social worker and her wellbeing assessed. We are focused on the safety and wellbeing of all young people at our residences as well as our staff. "
She said the girl would have been transferred to Palmerston North sooner, but fog delayed her flight.
"And due to her refusal to travel, road options were not safe for staff."
Waitakere police inspector Rod Fraser said every effort was made to ensure youths who had to be held in cells were "as comfortable as possible and that they have a placement with CYF as soon as practicable".
"This is never an ideal situation for police as the police cells are designed for short-term adult accommodation with limited catering, showering and supplied bedding."