A prisoner set fire to his cell “trying to light a spice cigarette” and told a judge she would be “followed home”, a court heard.