Gul Nawaz Hussain KC said his client Mr Khalife wanted to join the special forces, but was told not to apply “because of where his parents are from”.
Asked about Mr Khalife, Capt Fox said he would have “advised against going for special forces” as it was “a very long process and the vetting is in the last two weeks”.
He added it was important to “manage expectations for some soldiers”.
In an electronic note to himself, previously read to the court, Mr Khalife wrote that after being told he would be unlikely to pass the vetting process he “decided to start my own intel operation to prove that I was able to do this”.
In the note he added that he decided to use his connection to Iran to his advantage.
The jury has heard the Mr Khalife was first arrested in January 2022, and charged in January 2023.
He is alleged to have escaped from Wandsworth prison eight months later by strapping himself underneath a food delivery van before being recaptured after three days.
The trial continues.