Gordon Brown is preparing for a humiliating climbdown over his proposal to hold terrorist suspects for 42 days after being told that it will be defeated in the House of Lords.