A senior public servant says she could not stop the Robodebt scheme despite knowing it was illegal.

Serena Wilson, the former deputy secretary at the Department of Social Services (DSS), has spoken on the eighth day of the royal commission into the welfare debt recovery scheme. 

Ms Wilson was responsible for obtaining legal advice on behalf of the Department of Human Services (DHS) for the scheme.

Ms Wilson received legal advice during the design of the scheme that the “income averaging” method was unlawful, but she lacked the “courage” to tell then-social services minister Scott Morrison.

Counsel assisting the commission Justin Greggery KC put to Ms Wilson that because of this, she had “disregarded the consequences of the unlawfulness” of the scheme.

“You knew it was unlawful, you knew averaging was unlawful and you did nothing, correct? You took no steps to stop it,” Mr Greggery said.

“I took no steps to stop it,” Ms Wilson replied.

“You were in a position to do something as deputy secretary of the relevant department,” Mr Greggery said.

“Yes … I took no action,” Ms Wilson replied.

Mr Greggery said: “You could act consistently with the code of conduct which applies to you as an Australian public servant and give full and frank advice or you could go down the road of doing things, taking steps which ensured the continuation of what you then believe to be unlawful”. 

“I could have done something then … I wish I had,” Ms Wilson said.

Mr Greggery continued: “You were duty bound to … you were supposed to act with integrity … with honesty”.

“You breached the code of conduct by your deliberate choice,” he said.

Ms Wilson admitted that she had.

“I could have acted but I didn't,” she said.

Mr Greggery said: “That means that you did that with actual knowledge of the consequences of the raising of unlawful debts on a large scale”. 

Ms Wilson replied: “I took no action”. 

“It's your responsibility isn't it … as the deputy secretory to ensure proposals which are neither supported in law or policy don't get some traction?” Mr Greggery asked Ms Wilson.

“In hindsight, it was my responsibility to ensure that the department that was briefing the minister was sufficiently reflecting those concerns,” Ms Wilson replied.

Ms Wilson said that when she met with then-social services minister Scott Morrison, she thought they had “come to an understanding” that the income-smoothing or averaging method of calculating alleged debts would not go ahead.

She said she “believed at the time” that Mr Morrison knew the use of “data to calculate entitlement and as the basis for raising debts would not proceed”.

“I thought we'd killed it,” she said. 

“In hindsight, I was clearly wrong.”

Analysts say this week’s evidence has shown there is a deep rift between the Department of Social Services and the Department of Human Services.