Repository navigation
Description
🤖 Claude Opus 5.5 writing for sol-tau
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
Real-world (GitHub, private repo, no required checks):
- Open a docs-only PR. CI skips most jobs and goes green in about 40 s.
- The agent spends a minute or two on other work (an independent review, a comment), then calls
watch_pull_requeston the PR. CI is already green at this point. - The tool returns
{"watching": true, "wasWatching": false}. Its description says "T3 wakes you on … passed required checks … After this call, end your turn", so the agent ends its turn.
Timeline (UTC): PR opened 12:57:02, last check completed 12:57:41, watch_pull_request called 12:59:00. No wake came. The user noticed the green PR and asked about it several minutes later. unwatch_pull_request then returned wasWatching: true, so the watch had been armed the whole time.
Deterministic: this is the behavior pinned by pullRequestWatch.test.ts "baselines already-passed checks". The first read after awaitingBaseline: "all" records passed: true and emits no change. Later reads of the same head also emit nothing.
Expected behavior
An agent that starts watching a PR whose checks already passed should learn that, either:
- in the
watch_pull_requestresult (for examplechecks: "passed"plus a note such as "Checks already passed on ; no wake will come for them"), the way the tool already answers "This PR is already merged/closed, so there is nothing to watch"; or - through one wake on the baseline read when the gate has already settled.
Actual behavior
The baseline read hides the pass, and the tool result does not mention check state. The agent follows the tool description, ends its turn, and waits forever on a PR that is ready. Docs-only and other short-CI PRs hit this often, because CI finishes before the agent gets to the watch call. Across one user's sessions this has been the cause of several "it's green, why are you still waiting?" corrections.
Impact
Major degradation or frequent failure
Version or commit
0.1.12-nightly.20261122.5085 (desktop, Linux). Code read at main b23f1e8.
Environment
Linux (Arch), T3 desktop, Claude provider (Claude Opus 5.5). GitHub, private repository on GitHub Free, so branch protection and required checks are unavailable and the gate is every check (pullRequestWatch.ts:134).
Logs or stack traces
# watch call result
{"host":"github.com","repository":"<org>/<repo>","number":<n>,"url":"…/pull/<n>","watching":true,"wasWatching":false}
# gh pr view --json statusCheckRollup at 13:02 UTC: all 8 checks COMPLETED (2 SUCCESS, 6 SKIPPED), latest completedAt 12:57:41Z
# unwatch at 13:03 UTC
{"watching":false,"wasWatching":true}Code pointers (main @ b23f1e8):
apps/server/src/orchestration-v2/pullRequestWatch.ts:156-159:checks-passedis pushed only when!checksBaseline.apps/server/src/orchestration-v2/Orchestrator.ts:5372-5374: a fresh watch starts withawaitingBaseline: "all".apps/server/src/mcp/toolkits/pullRequests/tools.ts:402: the description tells the agent to end its turn after the call.:271already handles the merged/closed case with a "nothing to watch" message.
Workaround
Before ending the turn, the agent runs gh pr checks <pr> and acts if everything has finished. We enforce this locally with a Claude Code Stop hook: it reads the transcript for PRs that were watched and not unwatched, asks gh pr view --json statusCheckRollup, and blocks the stop once if an open PR's checks have all finished.
Activity