Norris Henry, 38, is accused of killing Ali Abucar Ali and attempting to kill Elizabeth Walsh, in Brentford, in November 2021.
The defendant appeared in court by video-link from a psychiatric hospital and is not fit to stand trial.
The jury is not required to reach a verdict, instead it must decide if he physically committed the acts.