The cabinet secretary is to investigate demands from senior MPs for fundamental reform of Revenue and Customs after it admitted "mistakenly" giving millions of pounds to some of the richest bankers in the world.

MPs, led by Margaret Hodge, the chairwoman of the public accounts committee, confronted Gus O'Donnell after they had accused Britain's most powerful taxman of lying to parliament about a secret sweetheart deal he cut with Goldman Sachs. They said that the head of the civil service had to consider how to bring greater accountability to the Revenue's dealings with big business.

The Conservative MP Richard Bacon, a fellow member of the public accounts committee, said that if Dave Hartnett, permanent secretary for tax at HM Revenue & Customs, had been a politician, "he would have been forced to resign by now". Other MPs claimed that Hartnett was "out of control" and that there were no effective checks and balances on him in Whitehall or Westminster.

Even before the Goldman Sachs deal, Hartnett had become the most controversial tax commissioner in the history of the Revenue. He agreed to allow Vodafone to escape a minimum of £1 billion in tax. Freedom of Information requests revealed that he had enjoyed 107 lunches over two years with corporations, the "big four" accountancy firms, and banks, including Goldman Sachs.

Despite assuring members of the treasury select committee that he did not deal with Goldman's tax affairs, Hartnett had to admit to the Public Accounts committee that he had confirmed a deal that allowed the bankers to escape the interest and penalties on unpaid tax that ordinary citizens and businesses must pay if they fall foul of the Revenue.

In 2005 the bank tried to evade tax by depositing bankers' salaries and bonuses in accounts in the British Virgin Islands. All other companies that tried similar tax evasion scams accepted that they were in the wrong and paid the Revenue the outstanding tax and penalties. But according to a Revenue report, Goldman refused to pay for five years by contesting "every conceivable point". Hartnett intervened and allowed Goldman to pay the back tax but escape about £7m in interest payments. In another internal document leaked to the Commons, Anthony Inglese, the Revenue's chief lawyer, says of the Goldman deal that although "he would always want to assist" Hartnett, he would not do so if the tax commissioner's behaviour was "unconscionable".

MPs have told O'Donnell that the secrecy around the Revenue's deals with corporations needs to be broken. Hartnett refuses to answer journalists' questions about his arrangements with Vodafone and Goldman, saying that taxpayers' affairs must be confidential.

Hodge said that she wanted O'Donnell to accept that corporations were not entitled to the same privacy rights as individuals. The committee also wants "to see a proper separation of powers" inside the Revenue. At present, Hartnett makes deals and then, acting in his role as tax commissioner, approves his own actions, a situation Hodge described as absurd.

The public accounts committee also wants the Revenue to be accountable to the National Audit Office, and for the latter's officials to have the right to brief MPs in confidence about controversial decisions.

At present the Revenue refuses to give the auditors detailed accounts of big tax disputes, once again citing the need for confidentiality.

Hodge and Bacon stopped short of calling for Hartnett to resign, although privately members of the public accounts committee believe his position is untenable. Jesse Norman, a Conservative member of the treasury committee, has said that Hartnett should resign after his statement to Parliament that he did not deal with Goldman turned out to be untrue. Hartnett explained that when he said he did not deal with Goldman Sachs he meant that he did not deal with its tax affairs every day.