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): subagents stop burning tokens on pull request watch wakes by t3dotgg · Pull Request #16217 · pingdotgg/t3code

Conversation

@t3dotgg

@t3dotgg t3dotgg commented Oct 5, 2026

Copy link
Copy Markdown
Member

Delegated subagents were burning huge numbers of tokens on pull request watch wakes nobody reads. Across the fleet since Oct 1, finished subagents ran about 4,000 extra times. On cup2 alone that was 3,635 extra runs and about 1.48B input tokens, against about 398M for the subagents' real work. One review subagent ran 151 times.

Two things combined:

  1. Before fix(server): subagents no longer inherit parent pull-request links #14918, a subagent copied its parent's pull request links, including active watches. Every check, comment, and conflict on the parent's pull request then woke each finished subagent. Its result had already gone to the parent, so these runs reached no one. Some ran babysit-pr, and one edited code in parallel with its parent. fix(server): subagents no longer inherit parent pull-request links #14918 stops new copies, but watches that subagents already hold stay active.
  2. With dozens of watches, the shared GitHub GraphQL quota ran out. Rate-limited reads counted toward the 15-minute give-up, so every watch ended with a wake that says "call watch_pull_request to watch it again". The agent re-watched into the same limit and woke again 15 minutes later. On cup2 this sent 2,388 "stopped watching" wakes to subagents in two days.

Fix:

  • Subagent threads cannot start a pull request watch. watch_pull_request returns a typed refusal whose text reaches the agent, telling it to put the pull request in its result so the parent can watch it. The orchestrator refuses the command too.
  • The watch reactor ends watches that subagents already hold on its next sweep. It does not wake the subagent and does not read the host.
  • A host rate limit no longer counts toward the 15-minute give-up. The watch waits until the limit resets.

Tests cover a rate-limited watch (stays on, no wake after 30 passes) and a subagent with an inherited watch (new watch refused, inherited one ended without a host read or wake). Both fail without the fix. The Stop test now gives its subagent an inherited watch instead of starting one, because subagents can no longer start one.

Not changed: review subagents still call link_pull_request for the pull request they review, because the runtime instructions tell every agent to link pull requests it works on. Links do not wake anyone, so this costs a few tool calls per subagent.

Reviewed with sol-loop: 2 rounds with GPT-6.1 Sol on high.

Created with Claude Opus 5.5 in Claude Code.

Sorry, something went wrong.

Uh oh!

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

All reactions
t3dotgg and others added 3 commits October 5, 2026 15:08
@t3dotgg @claude
fix(server): delegated subagents stop burning tokens on pull request …
2c49f91
…watch wakes

Subagents cannot watch pull requests; watches they inherited end without a wake.
A host rate limit no longer counts toward giving up on a watch.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@t3dotgg @claude
fix(mcp): watch_pull_request tells a subagent why it cannot watch
a296dd1
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@t3dotgg @claude
docs: rewrap pull request watch paragraph after rebase
15a0e69
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Oct 5, 2026
@juliusmarminge juliusmarminge added the macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews label Oct 5, 2026
macroscopeapp[bot]
macroscopeapp Bot reviewed Oct 5, 2026
View reviewed changes
Comment thread apps/server/src/orchestration-v2/PullRequestWatchReactor.ts Resolved

Uh oh!

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

@macroscopeapp

macroscopeapp Bot commented Oct 5, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 74f80f8

Macroscope's review found this PR approvable — This is a focused server bug fix that prevents subagents from creating or honoring pull-request watches that cannot deliver useful results, while preserving parent-thread watches and pausing cleanly through host rate limits. The production changes are narrowly scoped and covered by targeted tests, with no sensitive, schema, deployment, or static-analysis impact.

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.

@github-actions

github-actions Bot commented Oct 5, 2026 •
edited
Loading

Uh oh!

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

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 20.9 KiB 20.9 KiB 0 B (0.0%) 29.3 KiB ✅
Codex Live turn messages 2 2 0 (0.0%) 8 ✅
Claude Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 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.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Claude Live turn WebSocket decoded 21.2 KiB 21.2 KiB 0 B (0.0%) 29.3 KiB ✅
Claude Live turn messages 1 1 0 (0.0%) 8 ✅

Baseline: 54b6b66 · PR result: 74f80f8 · 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.

macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Oct 5, 2026
View reviewed changes
@t3dotgg @claude
docs(server): say rate-limited watch passes leave the failure count a…
74f80f8
…lone

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@macroscopeapp
macroscopeapp Bot dismissed their stale review October 5, 2026 22:16

Dismissing prior approval to re-evaluate 74f80f8

macroscopeapp[bot]
macroscopeapp Bot approved these changes Oct 5, 2026
View reviewed changes
@t3dotgg

t3dotgg commented Oct 5, 2026

Copy link
Copy Markdown
Member Author

Note

🤖 Claude Opus 5.5 responding on behalf of Theo

Closing as superseded by #16208, which shipped every behavior here: subagents cannot watch, watches they inherited end without a wake, and a rate limit never ends a watch. #16208 also shares one read per pull request across watchers and slows the cadence.

After #16208 landed, I checked whether its subagent refusal text reaches the agent. It does: for a declared tool failure, Effect's MCP server sends error.message as the tool result text (effect/dist/ai/McpServer.js, declaredFailureResult). Nothing is left to fix in this branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@t3dotgg t3dotgg closed this Oct 5, 2026
@gustavohariel gustavohariel mentioned this pull request Oct 7, 2026
[Bug]: PR watch wakes a large thread with a cold prompt cache, re-billing the whole context (0% → 8% of a 5h window before I typed anything) #16829
Closed
2 tasks done
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

macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews size:M 30-99 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.

2 participants

@t3dotgg @juliusmarminge
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.