Desktop: no session event when a tracked PR is merged/closed (only comment & CI events arrive)
What I'm trying to do
When Claude Code is watching a pull request in a Desktop session, I want it to learn when that PR is merged (or closed), the same way it already learns about new review comments and CI status changes.
What happens today
The session receives ci-monitor-event notifications for new review comments and CI results on a watched PR, but there is no event when the PR's state changes to MERGED (or CLOSED). The "Merged" badge that appears in the UI is presentation chrome — it is not delivered into the agent's context.
Consequently the agent has no reliable signal that a PR has landed. It will keep treating the branch as open, may try to keep working it, and has to be told "I merged it" or run gh pr view defensively before asserting state. A user described it as "a real gap in your core logic."
Reproduction
- In a Desktop session, open/track a PR (so
ci-monitor-events start arriving for comments/CI). - Merge the PR on GitHub.
- Observe: no event is delivered to the session announcing the merge; the agent's view of the PR stays "open" until it independently queries
gh.
Requested behavior
Emit a ci-monitor-event (or equivalent notification) into the session when a tracked PR transitions to MERGED or CLOSED, including the new state and merge commit. This closes the loop with the existing comment/CI events and lets the agent stop work, clean up the branch/worktree, and avoid acting on stale assumptions.
Environment
- Claude Code Desktop (macOS)
- CLI version reference:
2.1.37(desktop app build may differ)
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗