Labor has seized on an admission by the attorney general, George Brandis, that the solicitor general provided advice on the “original draft” of a new terrorism bill to open a new front in its interrogation of the relationship between Australia’s first and second law officers, and query the constitutionality of national security proposals.

Mark Dreyfus, the shadow attorney general, wrote to Brandis to establish whether the solicitor general, Justin Gleeson, had provided advice about the criminal code amendment (high risk terrorist offenders) bill 2016.

The proposed legislation amends the criminal code to establish a scheme for the continuing detention of high-risk terrorist offenders who are considered by a judge in civil proceedings to present an unacceptable risk to the community at the conclusion of their custodial sentence.

In his reply to Dreyfus, Brandis said the government was satisfied of the constitutionality of the continuing detention proposal, and said the solicitor general provided advice on the original draft of the bill.

“The government received advice on the original draft of the bill, including from the solicitor general,” Brandis said in the letter.

The attorney general said subsequent amendments to the bill had taken into account views expressed by Gleeson “as well as feedback from the states and territories”.

In the letter Brandis advised Dreyfus to desist from “gratuitous and inaccurate” political statements and “stop playing politics with this issue”.

Dreyfus said this wasn’t good enough. “Hidden in this letter is the astonishing admission that the solicitor general, Justin Gleeson, has not been given the opportunity to advise on the final version of the [bill].

“This is the exact situation that Mr Gleeson has been concerned about since his letter to the attorney general in November last year, and which led to the misrepresentation of his advice on the citizenship bill,” Dreyfus said.

“Senator Brandis is not learning from his mistakes. Mr Gleeson cannot be said to have advised on a bill if he was only shown an initial draft, not the final version introduced to parliament which is currently before the parliamentary joint committee on intelligence and security.”

Gleeson in a recent submission to a Senate committee said he wasn’t consulted on the final version of the citizenship revocation proposal – which contradicts a suggestion from Brandis to parliament’s intelligence and security committee that Gleeson had advised the government was package was soundly based.

On Monday the prime minister attempted to shut down questions from Dreyfus about the validity of another tranche of terrorism law reform, the government’s citizenship revocation laws, by borrowing a locution from the Abbott era and advising Dreyfus to “get on Australia’s team”.

Turnbull moved to shut down the line of questioning from Dreyfus by first mocking and minimising the dispute between Australia’s first and second law officers as a “disturbance in the bar common room” – then suggesting the shadow attorney general was being unpatriotic in his line of questioning.

“What the shadow attorney general is now doing is taking his feud with the attorney general into an area where he is putting our national security at risk,” Turnbull told parliament on Monday.

The prime minister said Dreyfus needed to “get over these petty personal animosities and get on our team, get on Australia’s team, to ensure that we have the right legislation”.