- Thread errors: `.catch(() => null)` instead of `.catch(() => [])` so
failed getPendingComments shows `-` not `0`
- PR fallback: extract PR number from metadata URL when SCM lookup fails
- Activity fallback: use metadata `status` when agent introspection is
unavailable (working→active, idle→idle, stuck/errored→blocked)
- Activity mapping: treat `assistant`/`result` as idle, only `tool_use`
and `user` as active — avoids marking completed responses as working
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>