Classifies the tail of a background agent transcript as working, blocked, done, or failed and returns concise state JSON