Repository navigation
Description
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
On GitHub
- Open a PR in a scratch repository with a short GitHub Actions check. Ask an agent to merge the PR after CI succeeds.
- Read the PR while the job is pending. Let the job finish successfully without pushing again or changing the PR.
- Register
watch_pull_requestwithuntil: "merged"after the job finishes. Let the agent end its turn as directed by the tool. Leave the PR open and avoid posting comments or reviews. - The first watch read sees the same head with passing CI. The agent receives no wake and the requested merge stalls until someone sends another message.
That sequence reproduces the handoff gap without needing to hit a cache timing window. In the real incident, step 2 was implicit because the final T3 PR read returned cached pending status after the job had finished.
Deterministic evaluator reproduction
Use the existing watch, detail, check, and noRemarks fixtures in pullRequestWatch.test.ts. The existing test demonstrates the silent baseline. Add the merge-wait case:
it.each([false, true])("wakes a merge wait on its first passing read (required: %s)", (required) => {
const green = detail({ checks: [{ ...check("test", "success"), required }] });
const first = evaluatePullRequestWatch(
watch({ awaitingBaseline: "all", until: "merged" }),
green,
noRemarks,
);
assert.deepEqual(first.changes, [{ kind: "checks-passed", count: 1, required }]);
assert.deepEqual(evaluatePullRequestWatch(first.next, green, noRemarks).changes, []);
});I ran a minimal harness against the shipped 0.1.11 evaluator for the non-required check case. It returned passed: true, changes: [] on the first green read and changes: [] on a second unchanged read. A control case where the first watch read saw pending and the second saw success emitted checks-passed.
Expected behavior
A thread waiting to finish a merge should receive exactly one opportunity to reassess readiness when a fresh read confirms the current head's checks already pass. T3 can queue a wake or return a fresh readiness result to the caller so it can keep working. The agent still verifies merge readiness before merging.
Actual behavior
T3 records the already-passing checks as the initial watch state. That state consumes the pass without queuing a wake. Later reads of the same green head have no transition to report. In this incident the watch remained active until the user prompted the agent to resume.
Impact
Minor bug or occasional failure. An explicit merge request can stall indefinitely when there is no later PR activity.
Version or commit
Observed on T3 Code desktop/server 0.1.11. The first-pass suppression is also present in public main source at c00f1172. The live incident and evaluator harness used 0.1.11.
Environment
macOS desktop, GitHub.com, Codex provider.
Logs or stack traces
Observed timeline in UTC. Repository and thread identifiers omitted.
20:16:09 GitHub Actions check completed with success
20:16:27.608 pull_request_read returned pending in 2.82 ms from T3's cached detail
20:16:31.803 watch created: until=merged, awaitingBaseline=all, passed=false
20:16:33.063 first watch read: passed=true, checksPending=false, wakes=0
20:23:20.988 user prompted the thread, which then rechecked CI and merged
watch end wakes=0, reads=1
Cause and suggested fix
The watch reactor refreshes PR detail before evaluation. In pullRequestWatch.ts, checksBaseline suppresses the checks-passed change while the evaluator still stores passed = true. The first-read policy applies to merge waits too.
Keep silent baselining for passive watches. For an agent waiting to merge, deliver one readiness signal for a complete, passing first read. If until: "merged" also needs to preserve passive behavior, expose an explicit initial-read option for the merge handoff. Record the result against the current head so the next unchanged read stays quiet. Keep incomplete or placeholder results pending. Regression coverage should exercise first-read success with required and non-required checks, unchanged reads after the wake, and passive watch behavior.
Related: #37477 covers polling delay when a wake eventually arrives. #32276 covers duplicate pass wakes after reruns. This case has zero wakes for the completed CI.
Workaround
Check the current GitHub Actions job directly immediately before starting the watch. If it is already green, continue the merge flow in the same turn. This reduces the timing window. A user message resumes an already-stalled thread.
Activity
juliusmarminge commentedon Nov 22, 2026
This is the same problem as #40866, so I'm closing it in favour of that one. If it is different, say how and it will be reopened.