The officer had posed as the boss of a courier firm to infiltrate the group known as the Three Musketeers, the Old Bailey heard.
Naweed Ali, 29, from Sparkhill, Birmingham, is on trial along with three other men from the West Midlands.
The four deny preparing terrorist acts.
They were arrested on 26 August after a partially-constructed pipe bomb, machete and imitation gun were discovered by security services in Mr Ali's car.
Both Mr Ali, of Evelyn Road, and his co-accused Khobaib Hussain, 25, also of Evelyn Road, have previous convictions for attending a terror training camp.
See more stories from across Birmingham and the Black Country here
The Old Bailey heard Mr Ali had been employed by the officer - described in court only as "Vincent" - to deliver parcels.
On his first day, Mr Ali's Seat Leon was parked at a depot in Birmingham city centre while he went to Luton to deliver a parcel, the court heard.
Cross-examining, Stephen Kamlish QC suggested the officer had planted a bag of incriminating evidence in Mr Ali's car before MI5 arrived to bug it.
Mr Kamlish, for Mr Ali, said to Vincent: "You had until he left the car and MI5 came in, to plant a bag of incriminating items in his car. This was your only opportunity - yes or no?"
The officer said: "That's a interesting work of fiction. I'm afraid nothing you have just said to me makes any sense to me whatsoever. So no."
At a previous hearing, Vincent told jurors that during a search of Mr Ali's car, what appeared to be a pipe bomb and a handgun were found inside a JD Sports bag.
He told jurors he and another officer had eased the contents of the bag on to a ground sheet and carried it into a different room.
On Monday, Mr Kamlish asked the officer why he had put his hand in the bag and pulled out what he thought was a "live bomb" after the secret services had been told to leave the depot.
Vincent said it was a "calculated risk" and added: "I'm not a bomb disposal expert but I know what a pipe bomb looks like.
"This was a fast-moving, difficult situation and difficult decisions had to be made and that difficult decision was made."
The barrister told Vincent he had known it was not a real bomb "because you put it there".
Asked if he planted the device, Vincent said: "I would never be involved in anything like that, have never, and will never."
Mr Ali and Mr Hussain, Mohibur Rahman, 32, of High Lane, Stoke-on-Trent, and Tahir Aziz, 38, of Wulstan Road, also in Stoke, deny the charges.
The trial continues.
An undercover officer has described a claim in court that he planted a bomb in the car of a convicted terrorist as an "interesting work of fiction".