Based on your extremely scant information, this is the only reference I could locate.
Sec. 12.44. REDUCTION OF STATE JAIL FELONY PUNISHMENT TO MISDEMEANOR PUNISHMENT. (a) A court may punish a defendant who is convicted of a state jail felony by imposing the confinement permissible as punishment for a Class A misdemeanor if, after considering the gravity and circumstances of the felony committed and the history, character, and rehabilitative needs of the defendant, the court finds that such punishment would best serve the ends of justice.
Since I do not practice law in your State, this answer is provided solely for informational purposes only, for you to use as a starting point when speaking directly with a lawyer in your State. This answer does not constitute legal advice, create an attorney-client relationship, or constitute attorney advertising. I urge you to immediately contact an experienced criminal defense lawyer admitted to practice law in your State before you make any decisions about this case.
A 12.44(a) is the Section of the Texas Penal Code that allows a judge to sentence a person convicted of a state jail felony to the punishment of a Class A misdemeanor "if, after considering the gravity and circumstances of the felony committed and the history, character, and rehabilitative needs of the defendant, the court finds that such punishment would best serve the ends of justice." What that means is that it's up to the judge whether or not to punish the person with a maximum of 1 year in the county jail or 2 years probation OR to punish him with the state jail felony punishment which is 6 months to 2 years in state jail (with NO early release) or up to 5 years of probation.
This may seem inconsequential but think of this: time in state jail is done day for day with no good time credit. Most county jails give good time or work credit which allows people to get out much sooner than their actual sentence.
Whether and if this is available is up to the judge, but having the prosecutor agree certainly improves a person's chances of avoiding
Disclaimer: This answer is provided as a public service and as a general response to a general question, it is not meant, and should not be relied upon as specific legal advice, nor does it create an attorney-client relationship.