✨ Improve agent context drill-downs#324
Merged
Merged
Conversation
Let agents page bounded build evidence and normalize focused comparison context without changing raw API payloads. Surface the resolved API origin on network failures so configuration mistakes are immediately diagnosable.
Robdel12
enabled auto-merge (squash)
July 22, 2026 23:31
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.
Why
Large visual builds could only hand an agent the first ten actionable comparisons or the entire raw build payload. Focused comparison context also exposed the same Honeydiff evidence under a different shape, while transport failures collapsed useful configuration clues into a generic
fetch failedmessage.Approach
Keep the API authoritative and make the CLI projection easier to continue through. Compact build context now accepts an evidence offset, reports exact paging facts, and returns an executable next-page command without ranking or inventing evidence. Focused comparison context gains an agent JSON projection built from the existing normalizer, while raw and full JSON remain unchanged.
Network handling changes only genuine fetch failures. The error identifies the resolved API origin and underlying transport cause; token selection and authentication behavior are untouched.
Evidence
The CLI subprocess coverage exercises an unreachable API, the second page of an eleven-comparison build, and focused comparison normalization with real region geometry. The complete test suite, lint, type definitions, production build, package dry-run, and packaged skill validation all pass.
--offsetpages the bounded agent projection rather than the HTTP response itself. Its purpose is to keep prompt context manageable while preserving API order and lossless raw access.