Threads can now formally monitor a PR after creating it. The agent calls a
new monitor_start MCP tool; a dedicated PullRequestMonitor service polls
GitHub every 30s, diffs review comments / reviews / check runs against a
per-thread cursor, and wakes the thread with a self-contained prompt when
there is something to address. The server — never the agent — declares the
PR ready from head-SHA-anchored GitHub state.
- GitHub monitor snapshot fetch (reviews, threads, check runs, mergeability)
with pure cursor-diff and readiness modules
- thread.monitor.start/update/end domain events through decider/projector,
monitor state on the thread shell, migration 034 (monitor_json)
- Wake dispatch protocol: claim → fresh terminal revalidation at the send
boundary → dispatch → cursor ack only after accepted start; user turns
always win and rewind in-flight wake cursors so events re-diff; 10-wake
circuit breaker ends as needs-attention
- Monitoring holds the thread unsettled; user settle ends the monitor;
session teardown ends it as session-ended
- UI: steady cyan Monitoring pill (never masks approval/input/failed),
blockers sub-line, header MonitorStrip with Stop, emerald Ready-to-merge
state with confirm dialog; clients can only end a monitor as "stopped"
Co-Authored-By: Claude Fable 5 <[email protected]>