Skip to content

Artifact triage ergonomics: head+tail previews, batched contextual search - #52

Merged
ayman3000 merged 1 commit into
mainfrom
fix/artifact-triage-ergonomics
Aug 23, 2026
Merged

Artifact triage ergonomics: head+tail previews, batched contextual search#52
ayman3000 merged 1 commit into
mainfrom
fix/artifact-triage-ergonomics

Conversation

@ayman3000

Copy link
Copy Markdown
Owner

Fixes the grep-storm behavior observed in Naseem runs: after a failed xcodebuild (exit 65), the model issued ~40 blind artifact_search calls per build because the truncated preview showed only the head of the output (boilerplate) while the verdict lives at the tail.

Changes

  1. ContextManager.activeDisplay — truncated active tool results now keep a head (⅓) AND a tail (⅔), with the cut marked in the middle. Same reasoning the receipt summarizer already applies.
  2. ArtifactSearchTool — accepts a batched queries array (legacy query string still works; at least one required), returns matches with ±2 context lines, marks the matched line with >, and reports per-query misses — all in one round trip.

Tests

4 new tests; full suite 262/262 green.

🤖 Generated with Claude Code

…arch

Truncated active tool results now preview the head AND the tail — build/test
logs put the verdict at the end, and a head-only preview sent models on long
artifact_search fishing expeditions (observed: ~40 blind greps per xcodebuild
failure).

artifact_search now accepts a batched `queries` array (single `query` still
works), searches via the artifact content directly, and returns each match
with ±2 context lines and a per-query no-match report — one round trip
instead of one call per keyword.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ayman3000
ayman3000 merged commit 67b5898 into main Aug 23, 2026
1 check passed
@ayman3000
ayman3000 deleted the fix/artifact-triage-ergonomics branch August 23, 2026 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant