Court records describe a yearslong arrest history alongside recent competency concerns for the accused.