Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): settled threads stop polling their pull requests #16762

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 2 commits intomain fromrefs/pull/16762/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Settled threads kept polling their linked pull requests. The sync sweep skipped only merged links, so open and closed links on a settled thread were re-read every 15 minutes, forever. This has been the rule since #10839. On LeftBook, one settled triage thread links 805 PRs (709 still open), which costs about 115 GitHub points per hour to refresh badges nobody looks at. The sweep also kept adding stack layers to that settled thread.

Fix

The sweep now considers only links on unsettled threads, except for reads that were explicitly requested and links that have never been synced. When a thread is unsettled, its links are due on the next sweep: open links right away, and closed links because their 15-minute timer kept running. No new hook is needed. Nothing unsettles a thread based on PR sync, so no behavior depends on these reads.

Trade-off: a settled thread's PR badges can be stale until it is unsettled. The user docs now say so.

The test that expected 15-minute polling of settled threads now checks the opposite: nothing is read across 16 sweeps, and both links are read on the first sweep after unsettling. It fails on the old rule.

🤖 Generated with Claude Code (Claude Opus 5.5)

    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    2. juliusmarminge added labelsmacroscope-review

    3. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Approved at 4e0240e

      Macroscope's review found this PR approvable — This is a localized server bug fix that stops unnecessary pull-request polling for settled threads while preserving synchronization when threads are active or unsettle. Targeted tests cover the changed polling and stack-linking behavior, with only an accompanying documentation update.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    4. Thread transfer impact

      ✅ Thread transfer remains within every enforced ceiling.

      ProviderMetricMain baselineThis PRImpactPR ceiling
      CodexTotal thread wire5.0 KiB5.0 KiB0 B (0.0%)6.8 KiB✅
      CodexThread snapshot wire3.8 KiB3.8 KiB0 B (0.0%)4.9 KiB✅
      CodexLive turn WebSocket wire1.2 KiB1.2 KiB0 B (0.0%)2.0 KiB✅
      CodexLive turn WebSocket decoded20.9 KiB20.9 KiB0 B (0.0%)29.3 KiB✅
      CodexLive turn messages220 (0.0%)8✅
      ClaudeTotal thread wire5.0 KiB5.0 KiB−24 B (−0.5%)6.8 KiB✅
      ClaudeThread snapshot wire3.8 KiB3.8 KiB0 B (0.0%)4.9 KiB✅
      ClaudeLive turn WebSocket wire1.2 KiB1.2 KiB−24 B (−2.0%)2.0 KiB✅
      ClaudeLive turn WebSocket decoded21.2 KiB21.2 KiB−41 B (−0.2%)29.3 KiB✅
      ClaudeLive turn messages21−1 (−50.0%)8✅

      Baseline: 655dfbe · PR result: 4e0240e · 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.

Sign in to join this conversation.