Repository navigation
Conversation
The GitHub plugin adds a watch_pr agent tool. While the app is open it reads each watched pull request through gh once a minute, and code decides when to wake the agent: CI finished on the head commit, or new feedback from someone other than the gh account after a quiet period. The wake is a message from the owner in the conversation where the agent asked, mentioning it, so every agent type handles it unchanged. Co-authored-by: mbot <3754f8729004d95654c46dbab3129e4ab9ef05cc2534e2a3fbfc155983bd637b@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Bradley Axen <baxen@squareup.com>
baxen
added a commit
that referenced
this pull request
Oct 19, 2026
Both GitHub host entries pin --hostname github.com. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Bradley Axen <baxen@squareup.com>
Collaborator
Author
|
🤖 Folded into #1325, which now carries the whole GitHub integration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Draft for the agent "outer loop": an agent watches a pull request, gets woken when CI finishes or feedback arrives, fixes, pushes, and keeps waiting. No model calls while waiting.
How it works
watch_pr { url, stop? }, throughctx.agents.addTool. The tool call already knows the agent and the conversation (channel / thread / Solo), and the watch remembers both.gh api graphql --input -call through a new manifest host command, so it relies on the user's existingghlogin and needs no token handling. Plain code decides when to wake the agent:sha:result, so a failed head that turns green after a rerun is reported again.ghaccount (which agents also push and comment as). It is batched until there has been 90s of quiet, so one review is one wake.path:lineand links. The agent reads the feedback itself withgh.stop: true.Why not a
ctx.agents.wakehost APIEach harness gets its owner trust check, the session to resume and the conversation context from the signed message that triggers a turn. A wake without a message would need a parallel path in all three harnesses. An owner-signed message reuses the proven path and also shows the loop's progress in the thread. The send is one function (
wakeinwatcher.ts), so it can switch to a host API later.Validation
vitestcovers thegithubplugin,features/agentsandplugins: 58 files, 753 tests passing. The new tests cover settling, once per sha:result, rerun-to-green, quiet batching, skipping the viewer's own comments, large seen sets, routing to a thread or the top level, a restart reading at once, unsent news being kept, the failure limit, stop, merge, and moving the watch to another conversation.host.commandsentry validates.seentrimming and URL case.Not yet done: a native app run (bundled host commands need a native rebuild), and a real agent loop on a live PR.
Known limits
ghaccount.addedKey); for Codex, that means a new thread.🤖 Generated with Claude Code