Fix MainConsole due to the change of AgentDelegate.