The backend was always trying to parse tool_input as JSON, which failed for UserPromptSubmit events that contain plain text prompts. This caused 500 errors when creating or fetching UserPromptSubmit events. Fixed by adding try-except blocks that gracefully handle both JSON and plain text tool_input values. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>