GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(server): threads settle right away when a watched PR merges by t3dotgg · Pull Request #26395 · pingdotgg/t3code

Conversation

@t3dotgg

@t3dotgg t3dotgg commented Oct 28, 2026

Copy link
Copy Markdown
Member

A thread with a PR watch did not settle when its PR merged. It sat in "Waiting on Watching pull request #N" for up to 2 minutes. In one case the agent merged #26387 at 10:00:02 and the server synced the merged snapshot at 10:00:03. The turn ended at 10:00:13, but the thread settled only at 10:01:30.

The cause: a watched link counts as awaited background work, and awaited work blocks auto-settle. The watch reactor ends a merged PR's watch without waking the agent, but only on its next 2-minute sweep. So the watch held the thread for nothing.

The fix: a watch whose link snapshot is already merged no longer counts as pending work. This gives:

  • The agent merges (for example with merge with cleanup or full send): the thread settles when the turn ends.
  • You merge it yourself without opening the thread: it settles as soon as the merged snapshot syncs, with no wake and no tokens. Main already did this with no tokens, but up to 2 minutes late.
  • Closed PRs still hold. The reactor wakes the agent for a close, and settling first would drop that message.
  • Awaited post-merge waits (t3_background_wait for CI or deploy) still hold the thread, so the bug from #24681 does not come back.

Proof: the existing watch test table gets a merged row and a closed row. It fails on main and passes here. I replayed the real thread state at 10:00:13 through derivePendingBackgroundWork. On main it returns the watch task, which holds the thread. With this fix it returns nothing. vp run check:changed passes.

Policy conflict: #26271 and #25181 go the other way: a merge wakes the agent, and #25181 also defers settlement while a merged watch is active. This PR assumes merges stay silent. Only one policy should land.

Council review

Rounds: 2

Delegate Round 1 Round 2
Claude Opus 5.5 8/10 9/10
Muse Wonder Full 9/10 9/10
Codex GPT-6.1 Sol 9/10 10/10

Made with Claude Opus 5.5 in Claude Code, run from T3 Code.

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@t3dotgg @claude
fix(server): threads settle right away when a watched PR merges
0881343
A PR watch held auto-settle until the watch reactor's next 2-minute sweep,
even after the merged snapshot had synced. The reactor ends merged watches
without a wake, so a merged link's watch no longer holds the thread.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Oct 28, 2026
macroscopeapp[bot]
macroscopeapp Bot approved these changes Oct 28, 2026
View reviewed changes
@macroscopeapp

macroscopeapp Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 0881343

Macroscope's review found this PR approvable — Merged PR watches no longer keep threads pending while watch cleanup catches up. This aligns completion bookkeeping with the existing watch lifecycle and leaves other pending work unchanged.

You can add or adjust custom eligibility rules. Learn more.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coderabbitai

coderabbitai Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: pingdotgg/t3code
  • Branch: t3/pr-watch-merged-settle
  • File: .coderabbit.config.ts
  • Commit: 0881343
  • Layers: Repository TS config
  • Review profile: CHILL
  • Plan: Team
  • Run ID: 3f038858-6dee-41ce-b849-332fb3b16812
Commits

Reviewing files that changed from the base of the PR and between 40d335a and 0881343.

Files selected for processing: 2
  • packages/shared/src/orchestrationV2PendingBackgroundWork.test.ts
  • packages/shared/src/orchestrationV2PendingBackgroundWork.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.

Walkthrough

The pending-work calculation now uses pull request snapshot state to omit watch tasks for merged pull requests. Tests add merged and closed pull request fixtures and expect closed pull requests to remain in pending-work results.

Changes: Pull request watch filtering

Layer / File(s) Summary
State-aware pull request watch filtering
packages/shared/src/orchestrationV2PendingBackgroundWork.ts, packages/shared/src/orchestrationV2PendingBackgroundWork.test.ts
The pull request type now includes a nullable snapshot state. The pending-work calculation omits watches for merged pull requests. Tests verify that closed pull requests remain in pending-work results.

Priority: Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related issues

  • pingdotgg/t3code#25160: This change omits merged pull request watches from pending background work. The issue requests a merge wake for verification.
  • pingdotgg/t3code#26083: This change modifies how merged pull request watches affect pending background work. The issue describes a race that can lose the post-merge wake.

Suggested reviewers: juliusmarminge, maria-rcks

Merge Risk: Minimal · up to 08813

The change removes completed merged-PR watches without dropping closed-PR or unrelated pending work, so no actionable merge risk remains.

Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Description check Warning The description clearly explains the problem, fix, behavior for merged and closed pull requests, verification, and policy conflict. It does not provide the required Scope and approval information or e… Add a Scope and approval section. Link the triaged issue or maintainer approval with the approval comment, or explain why this focused fix qualifies as an obvious bug without prior approval. Organize the existing content under the required …
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the primary change: threads settle immediately when a watched pull request merges.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description clearly explains the problem, fix, behavior for merged and closed pull requests, verification, and policy conflict. It does not provide the required Scope and approval information or explain why the change qualifies for the small, obvious bug exemption.

Resolution

Add a Scope and approval section. Link the triaged issue or maintainer approval with the approval comment, or explain why this focused fix qualifies as an obvious bug without prior approval. Organize the existing content under the required Problem, Change, Scope and approval, and Verification headings.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@t3dotgg
t3dotgg enabled auto-merge (squash) October 28, 2026 10:23
@t3dotgg
t3dotgg merged commit 2a73827 into main Oct 28, 2026
30 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@t3dotgg
t3dotgg deleted the t3/pr-watch-merged-settle branch October 28, 2026 10:25
@github-actions

github-actions Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅
Codex Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Codex Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Codex Live turn WebSocket decoded 21.6 KiB 21.6 KiB 0 B (0.0%) 24.4 KiB ✅
Codex Live turn messages 2 2 0 (0.0%) 8 ✅
Claude Total thread wire 5.0 KiB 5.1 KiB +6 B (+0.1%) 6.8 KiB ✅
Claude Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Claude Live turn WebSocket wire 1.3 KiB 1.3 KiB +6 B (+0.5%) 2.0 KiB ✅
Claude Live turn WebSocket decoded 21.9 KiB 21.9 KiB 0 B (0.0%) 24.4 KiB ✅
Claude Live turn messages 2 2 0 (0.0%) 8 ✅

Baseline: 40d335a · PR result: 0881343 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 108.5 KiB
  • Claude decoded thread snapshot: 108.8 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

voida6 added a commit to voida6/t3code that referenced this pull request Oct 28, 2026
@voida6 @claude
Merge upstream/main into feat/mobile-pr-monitor-rows
acdc2ed
Main now skips merged PRs in pullRequestWatchTasks (pingdotgg#26395). That check
moves into the shared isWatchedLink helper so the monitor row lookup
follows the same rule.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@voida6 voida6 mentioned this pull request Oct 28, 2026
feat(mobile): show the pull request in PR-watch monitor rows #21412
Closed
@leomontigatti leomontigatti mentioned this pull request Oct 28, 2026
docs: T3 update review 0.1.4-nightly.20261028.3822 leomontigatti/agent-workflow#56
Merged
@coderabbitai coderabbitai Bot mentioned this pull request Oct 28, 2026
fix(server): watched PRs wake the agent when they merge #26271
Merged
@andrewcai8 andrewcai8 mentioned this pull request Oct 28, 2026
chore: sync upstream through 612a8e59f0 andrewcai8/t3code#272
Merged
Pipyakas pushed a commit to Pipyakas/t3code that referenced this pull request Oct 28, 2026
@t3dotgg @claude @Pipyakas
fix(server): threads settle right away when a watched PR merges (ping…
38316bd
…dotgg#26395)

Co-authored-by: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 2a73827)
aorwall added a commit to aorwall/t3code that referenced this pull request Oct 29, 2026
@aorwall
chore: merge upstream t3code to fe219c4 (pingdotgg#264)
94b621e
Merges upstream `pingdotgg/t3code` `fe219c4de1` (95 commits, base
`49a9e80e0b`) into the fork. Branched from `main`; no open merge PR to
stack on.

## Resolution

15 conflicts, each resolved by the verdict `preflight.mjs` printed for
it. The full record is in `docs/fork/upstream-merge-log.md`
(2026-10-29). The main points:

- **`LegacySidebar.tsx` deleted upstream** (pingdotgg#21039). The deletion is
taken. Its fork deltas (touch long-press, Add project gate) already live
in `Sidebar.tsx` / `SidebarThreadRow.tsx`. The file's paths are removed
from three inventory entries, and the helper only it used is dropped
from `Sidebar.logic.ts`.
- **Composer access mode.** Upstream's simpler composer (pingdotgg#25869) shows
the Access control in three places: the Permissions chip, the
compact-menu section, and the effort-menu section in
`ComposerControlsBar.tsx`. All three are gated on `FEATURES.accessMode`.
`ComposerControlsBar.tsx` is added to `chat-composer-gates`.
- **Sidebar.** Upstream's boring-sidebar project folders are combined
with the fork's browse/closed/subtask filter. Upstream moved the row's
meta line into a `metaLine` variable, and the fork's owner name and
parent/child task links now live inside it.
- **Settings.** The boring-sidebar Labs rows are client settings and are
not gated. Simlock hosts join the `serverBehaviorSettings` rows, and the
`simlock-hosts` search id is mapped to that flag. The new Fallback model
row is hidden together with the default model row
(`defaultModelSetting`).
- **`AGENTS.md`.** Upstream now has agents check user-visible changes in
a real client without asking first. The fork's version says the same,
still pointing at the fork's skills.
- `agentContextBudget.json` uses upstream's numbers, plus the fork's 108
bytes for `ProjectScript.port`. The value `46015` was measured by
running the budget test.
- `pnpm-lock.yaml` was re-derived from upstream's copy.

**Merge stats:** 595 files landed vs 593 in the upstream range (the gap
is explained in the tracker entry). Fork delta: 766 files, unchanged.

## Verification

`verify.mjs` was run in full. These checks pass: duplicate-adds,
tripwires, resolution-check, unsupported-methods, lockfile, fmt, lint,
typecheck, build. In the test step, `web` and `client-runtime` pass. The
same failures as the 2026-10-27 and 2026-10-28 merges remain, each
confirmed failing alone:
- `t3`: `RepositoryIdentityResolver`, `GitVcsDriver`,
`CodexChatGptAuth`, `CodexManagedRuntime` (the known `/tmp` sticky-bit
gap)
- `provider-opencode`: `OpenCodeServerLedger`

## Usable as-is
- Boring sidebar project folders, two-line folder rows, and hiding empty
projects (pingdotgg#21039, pingdotgg#26387, pingdotgg#26391, pingdotgg#26463)
- Simpler composer with grouped controls and effort words (pingdotgg#25869). The
access-mode parts stay gated.
- Pending approvals on their timeline row (pingdotgg#26255); tool call diffs open
in the diff panel (pingdotgg#26304); compaction row timer (3ef1610)
- Many web fixes: chat tables, inline code double-click, numbered
composer lists, image chips, scroll-to-end, tool groups after a
usage-limit pause, long-thread timeline perf (pingdotgg#26727)
- New Claude threads default to Opus 5.5 (pingdotgg#26358)
- PR files: mark viewed with shift-click, and the diff follows the file
tree (pingdotgg#26349, pingdotgg#26730). These are reachable only where the PR surface is
(`pullRequestSurface`).

## Unsupported in Moatless / needs implementation
- **GitHub sign-in through the T3 Code for GitHub app** (pingdotgg#26245):
`sourceControl.signInStart`, `signInWait`, `signInCancel`, `appAccess`.
New `UnsupportedMethodError` entries.
- **Simlock device pools** (pingdotgg#25259, pingdotgg#26706): `device.simlockIdentity`
(new union entry) and the `simlockDeviceHostsEnabled` server setting.
Part of the device hub gap.
- **Fallback model when the default provider is out of usage** (pingdotgg#26164):
the `fallbackModelSelection` server setting cannot be saved, because
`server.updateSettings` is refused. The row is hidden.
- Managing GitHub maintainer edits (pingdotgg#25588): in the pull-request write
family Moatless does not dispatch.
- T3 Connect tunnel usage and T3 Chat account push (pingdotgg#26369, pingdotgg#25931):
relay/cloud, decided out.
- Mobile dynamic workflows in the Agents sheet (pingdotgg#18642) and the mobile
app fixes: mobile against Moatless is unverified.

## Backend behavior to consider reproducing in Moatless
These are listed under _Runtime fixes upstream made to its own server_
in `docs/fork/gaps.md`:
- Falling back to another provider when the default is out of usage
(pingdotgg#26164), and refreshing usage when a turn hits its limit (pingdotgg#26234); no
replay of stale Codex usage limits (pingdotgg#26331)
- Settling a thread at once when its watched PR merges (pingdotgg#26395).
Moatless reads no PR for settlement today, so this is a decision rather
than a fix.
- Loading long thread history in bounded pages (pingdotgg#26240); publishing
local git status before the remote lookup (pingdotgg#21046); releasing completed
PR sweep data (pingdotgg#25177)
- Thread links that outside MCP clients can open (pingdotgg#26642); listing
snoozed threads across projects in one MCP call (pingdotgg#26442)
- Provider approval and subagent fixes: Claude command approvals
(pingdotgg#20145), ACP ID-only approvals (pingdotgg#26647), Cursor subagents (pingdotgg#26592),
OpenCode subagent runtime mode (pingdotgg#26302), Codex shadow-home locks
(c4606e5); shorter remote reconnect and command delays (pingdotgg#25754)

## After merging
- Disable the new upstream workflow: `gh workflow disable
mobile-fingerprint-label.yml --repo soaplabs/t3code`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---
Moatless task:
https://moatless.soaplabstest.com/tasks/b2df0ac3-40ce-4c78-a67d-b561b3d8772d
@adampeterhiggins adampeterhiggins mentioned this pull request Oct 29, 2026
merge upstream/main into fork adampeterhiggins/t3code#513
Merged
This was referenced Oct 29, 2026
Merge upstream/main 48a292364a into coder-only (sync stage 3 of 5) henrychu04/t3code-coder#279
Merged
Record the 6d450a4284 sync's lessons in sync.md henrychu04/t3code-coder#283
Merged
@derek-eliza derek-eliza mentioned this pull request Oct 29, 2026
watch_pull_request ends silently on merge, so agents never verify merge-queue landings #25160
Closed
incognitojam pushed a commit to incognitojam/styal that referenced this pull request Nov 5, 2026
@t3dotgg @claude @incognitojam
fix(server): threads settle right away when a watched PR merges (ping…
1eb07f0
…dotgg#26395)

Co-authored-by: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 2a73827)
Upstream-PR: 26395
@olafura olafura mentioned this pull request Nov 7, 2026
test(features): ledger upstream T3 Code through 9504a09f08 hal-c2/hal-c2#1189
Merged
@maschwenk maschwenk mentioned this pull request Nov 13, 2026
fix(server): a watched PR's merge wakes the agent before the thread settles maschwenk/t3code#75
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@macroscopeapp macroscopeapp[bot] macroscopeapp[bot] approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@t3dotgg
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.