A teen accused of murder during a home invasion knew his companion was armed with a knife and violence was the likely outcome, a judge has heard.