Arran Sharp, 41, has previous convictions for violence, York magistrates heard.
He was sectioned under the Mental Health Act with a hospital order at Sheffield Crown Court six years ago and restrictions placed on when he could be released.
His solicitor Keith Whitehouse said Sharp was “released from hospital care” shortly before the incident in York on New Year’s Day.
Sharp, who gave his address as Foss Park Hospital, pleaded guilty to carrying a knife in public in Navigation Road, off Walmgate, York, and his case was adjourned while his defence team seek an “independent” psychiatric report.
Staff from Foss Park Hospital off Haxby Road, York, escorted Sharp to and from his hearing before the York court.
Martin Butterworth, prosecuting, said police were alerted on the morning of January 1 that an incident involving two people had taken place.
Armed officers sent to the scene found two men matching the description of the two involved, one of which was Sharp.
When he was searched, officers found a kitchen knife in his waistband.
He gave no comment when interviewed by police later.
Mr Butterworth said Sharp was “subject to ongoing restrictions out of hospital”.
YOU’LL FIND MORE ON THIS STORY AND OTHERS AT www.yorkpress.co.uk OR PICK UP YOUR COPY OF THE NEWSPAPER ITSELF AVAILABLE SIX DAYS A WEEK AT YOUR LOCAL NEWSAGENT

Mayor Skaith's 10-year plan for York and North Yorkshire
The first headline act has been announced for the Live at York Museum Gardens concert series in 2026.
Yorkshire Carer Speaks Out on Being Underpaid
Adult stuck in baby swing in popular York park
MORE than 10,000 people will be pounding the pavements when they take on the Altra Yorkshire Marathon 2025 this weekend
York Marina at Naburn wins five Gold Anchor Award
Love Island’s Harrison Solomon Set to Appear at Flares York This Friday


