fix(resolve-pr-threads): cut 40% of lines to eliminate hallucination failure modes#52
Conversation
…failure modes Recurring failures traced to: sub-agents told to "read rest-api-patterns.md" without knowing the path, verbose CRITICAL sections that got ignored, parallel mutations causing cascade failures, and Python scripts written instead of direct gh commands. Changes: - SKILL.md: 357 → 212 lines. Remove CRITICAL section, Determine PR Context duplicate block, Special Cases section, and example blocks. Trim sub-agent templates from ~45 lines to ~25 lines by removing redundant DO NOT items. Add "DO NOT write Python/shell scripts" rule. Inline reply command directly in template instead of "go read rest-api-patterns.md". Step 4 now explicitly resolves threads sequentially (not in parallel) to prevent cascade failures. - graphql-queries.md: 88 → 71 lines. Remove duplicated Common Errors table. - rest-api-patterns.md: 113 → 85 lines. Remove When-to-Use table, duplicate Parameters table, and trailing cross-reference footer. (claude)
There was a problem hiding this comment.
Important
Looks good to me! 👍
Reviewed everything up to f7d4926 in 12 seconds. Click for details.
- Reviewed
500lines of code in3files - Skipped
0files when reviewing. - Skipped posting
0draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
Workflow ID: wflow_Ocr3jCPUWkj8TulU
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
Summary of ChangesHello @JacobPEvans, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on refining and streamlining the documentation and operational logic for resolving pull request threads. The primary goal is to reduce cognitive load and potential 'hallucination' failure modes in automated agents by making instructions more concise, direct, and less verbose. This involves significant cuts to markdown files, simplifying sub-agent prompts, and enforcing sequential processing for critical steps to improve reliability and efficiency. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
The pull request significantly refactors the SKILL.md, graphql-queries.md, and rest-api-patterns.md files to improve clarity, reduce verbosity, and streamline the resolve-pr-threads skill. All original comments were kept as they align with good practices and do not contradict any of the provided rules. The changes aim to eliminate hallucination failure modes by removing redundant information, inlining critical commands, and explicitly enforcing sequential thread resolution. The sub-agent prompts have been trimmed, and a new DO NOT write Python/shell scripts rule has been added. Overall, these changes enhance the maintainability and correctness of the skill by making the instructions more direct and less prone to misinterpretation.
There was a problem hiding this comment.
Pull request overview
This PR streamlines the resolve-pr-threads skill documentation to reduce verbosity and remove indirect cross-references that were contributing to agent execution errors and command hallucinations.
Changes:
- Condenses
SKILL.mdby removing redundant/verbose sections and shortening sub-agent prompt templates. - Updates the workflow to explicitly resolve threads sequentially (one mutation at a time) to reduce cascading failures.
- Trims duplicated/auxiliary content from
graphql-queries.mdandrest-api-patterns.md.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| github-workflows/skills/resolve-pr-threads/SKILL.md | Shortens orchestrator + sub-agent prompts, adds “no scripts” rule, and documents sequential thread resolution. |
| github-workflows/skills/resolve-pr-threads/graphql-queries.md | Removes duplicated “Common Errors” content while retaining the canonical query/mutation formats. |
| github-workflows/skills/resolve-pr-threads/rest-api-patterns.md | Removes advisory/duplicate tables and tightens non-thread comment guidance. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Align placeholder {commentId} -> {databaseId} in rest-api-patterns.md
to match SKILL.md and the actual GraphQL field name
- Broaden troubleshooting row: REST reply fails can be permissions too,
not just invalid databaseId
- Clarify context inference block: explicitly state that shell variable
values should be substituted for {placeholder} syntax in commands
(claude)
Summary
SKILL.mdfrom 357 → 212 lines (40% cut) by removing the verbose CRITICAL section, duplicate PR context block, Special Cases section, and example blocks"For REST API details: read rest-api-patterns.md"— sub-agents no longer need to find/read another fileDO NOT write Python/shell scriptsto the DO NOT list + reinforces inline in both templatesgraphql-queries.md: 88 → 71 lines — removes duplicated Common Errors tablerest-api-patterns.md: 113 → 85 lines — removes When-to-Use table, duplicate Parameters table, trailing cross-reference footerRoot Cause
Seven fix attempts over 10 days failed because the skill was too long and too indirect. Sub-agents were told to read another file but hallucinated the path or mutation names. Parallel mutations cascaded on first failure. The verbose CRITICAL section was ignored while the actual commands got lost in noise.
Test plan
"read rest-api-patterns.md"or"read graphql-queries.md"references in sub-agent prompts/resolve-pr-threadsagainst an actual PR with unresolved threads🤖 Generated with Claude Code
Important
Reduces markdown file sizes and improves resolve-pr-threads skill by removing redundancies and ensuring sequential thread resolution.
SKILL.mdfrom 357 to 212 lines by removing verbose and duplicate sections.graphql-queries.md: Reduced from 88 to 71 lines by removing duplicated Common Errors table.rest-api-patterns.md: Reduced from 113 to 85 lines by removing redundant tables and footers.This description was created by
for f7d4926. You can customize this summary. It will automatically update as commits are pushed.