The Commonwealth Bank of Australia knew about a “catastrophic” code error that caused widespread non-compliance with money laundering rules two years before it was disclosed to the market, a court has been told in a rare shareholder class action trial.