Skip to content

[q] feat(pr-sous-chef): add thread-resolver sub-agent to auto-resolve addressed review threads #41941

Description

@github-actions

Q Workflow Optimization Report

Request

Triggered by @pelikhan on PR #41914:

update pr sous chef to resolve pull request review comments that have been addressed. Make it a sub agent goal.

Changes Made

PR Sous Chef (.github/workflows/pr-sous-chef.md)

New thread-resolver sub-agent — a dedicated, lightweight sub-agent goal that:

  • Fetches review threads for a PR using the GitHub MCP pull_requests toolset
  • Filters for threads that are unresolved (isResolved: false) and outdated (isOutdated: true, meaning the code they reference was changed by a subsequent commit)
  • Returns thread node IDs for the main agent to resolve
  • Budget: at most 4 tool calls; returns compact JSON only

New resolve-pull-request-review-thread safe-output (max: 20, target: *) — enables the agent to resolve threads via safeoutputs resolve_pull_request_review_thread --thread_id <id>

Main agent updates:

  • Token efficiency rule 5: instruct to invoke thread-resolver for every eligible PR
  • Token efficiency rule 6: silent skip on thread-resolver failure (does not abort the run)
  • Token efficiency rule 9: add resolve_pull_request_review_thread to the allowed safe-output list
  • New Required thread resolution section with step-by-step instructions and a shell call example
  • Run-summary noop now includes a threads_resolved=N counter

Expected Improvements

  • Automatically cleans up stale review threads where code was already fixed, reducing reviewer noise
  • Thread resolution runs independently of the nudge cooldown — even PRs skipped for nudging still have their addressed threads resolved
  • Keeps PR review surfaces tidy without requiring manual "resolve" clicks

Validation

✅ pr-sous-chef — compiled successfully, 0 errors, 0 warnings

Note: .lock.yml will be regenerated automatically after merge.


Warning

Protected Files — Push Permission Denied

This was originally intended as a pull request, but the patch modifies protected files. A human must create the pull request manually.

Protected files

The push was rejected because GitHub Actions does not have workflows permission to push these changes, and is never allowed to make such changes, or other authorization being used does not have this permission.

Create the pull request manually
# Download the patch from the workflow run
gh run download 28301015100 -n agent -D /tmp/agent-28301015100

# Create a new branch
git checkout -b q/pr-sous-chef-resolve-addressed-threads-6c302f1a561585c6 main

# Apply the patch (--3way handles cross-repo patches)
git am --3way /tmp/agent-28301015100/aw-q-pr-sous-chef-resolve-addressed-threads.patch

# Push the branch and create the pull request
git push origin q/pr-sous-chef-resolve-addressed-threads-6c302f1a561585c6
gh pr create --title '[q] feat(pr-sous-chef): add thread-resolver sub-agent to auto-resolve addressed review threads' --base main --head q/pr-sous-chef-resolve-addressed-threads-6c302f1a561585c6 --repo github/gh-aw

🎩 Equipped by Q · 121.5 AIC · ⌖ 19.3 AIC · ⊞ 8K ·

  • expires on Jun 29, 2026, 12:47 PM UTC-08:00

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions