﻿# Qwen Code moves pull-request state watching from channels to the daemon operator

Test operator settings, legacy aliases and comment cursors during PR-watch migration; duplicate or replayed notifications can hide behind apparently successful delivery.

Author: Retrivium team
Updated: 2026-11-15
Canonical URL: https://retrivium.ai/journal/week46-agent-qwen-operator-owned-pr-watch-migration/
Language: en

The November 15 Qwen Code v0.27.4 release makes PR-state watching operator-owned through serve.sessionPrWatch and retires state-transition delivery in the GitHub channel. Comment delivery keeps its separate path. Operators should treat the change as a subscription migration, with explicit ownership and upgrade checks, rather than assuming an existing channel configuration continues unchanged indefinitely.

## Identify the authoritative subscription

Create a synthetic repository event fixture and record the effective event set and instruction templates. Compare an explicit daemon setting with the temporary legacy configuration alias. The implementation gives the explicit setting precedence. Test through the operator path and confirm an ordinary session cannot redefine the subscription. A visible channel card does not establish who currently owns state-transition delivery after the upgrade.

## Comments and state changes remain different lanes

Emit a comment event and a PR-state transition with distinct markers. Inspect which producer detects and delivers each. The channel’s comment cursors remain relevant even after its state watcher is retired. Do not reset or rename the entire state file to make the new watch appear fresh; that can change comment backlog behavior. Compare accepted deliveries by event identity so two successful messages cannot conceal a duplicated transition.

## Upgrade settlement needs its own fixture

Seed a test channel with pending old transitions and existing comment cursors, then run the first-connect migration. Inspect retired tasks, preserved cursors and any user-facing delivery. The PR deliberately settles old watch state without replaying it as fresh work. This protects the distinction between upgrading the subscription mechanism and deciding to act on historical PR changes that the application may already have handled.

## Validate wake and action behavior explicitly

Use inert sessions to test selected transitions, role-specific instructions and wakeDormant behavior. Confirm a disabled effective event set stops detection consistently across periodic and on-demand paths. The release changes ownership and wiring, not permission to perform arbitrary repository actions. A reviewable migration records one authoritative subscription, preserved comment continuity and the exact session behavior triggered by each allowed synthetic transition.

## Sources

- [Qwen Code v0.27.4 release notes](https://github.com/QwenLM/qwen-code/releases/tag/v0.27.4)
- [Qwen Code implementation and review #17214](https://github.com/QwenLM/qwen-code/pull/17214)

## Related reading

- [GitHub webhook redelivery: event GUID versus delivery attempt](/journal/guide-github-webhook-guid-delivery-attempt/)
- [What should Qwen Code 0.27.0 bind to a pull request head SHA?](/journal/news-qwen-code-pr-view-head-ci-freshness/)
