Why AI Agents Fail in Production: Causes, Risks, and Fixes