Clear error patterns: Reduce from 68 to 25 patterns (63% reduction) #2047
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.
Overview
This PR simplifies error pattern detection across all three agentic engines (Claude, Codex, and Copilot), reducing the total number of patterns from 68 to 25 (a 63% reduction) while maintaining full error detection capabilities.
Problem
The error pattern system had grown overly complex with many redundant and non-engine-specific patterns:
This complexity made the codebase harder to maintain and created unnecessary duplication across engines.
Solution
New Pattern Philosophy
Error patterns should focus on:
Error patterns should NOT duplicate detection of:
These are now caught by generic
ERROR:andError:patterns in the common pattern set.Changes Made
Common Patterns (shared by all engines):
(ERROR|Error):\s+(.+)pattern(WARNING|Warning):\s+(.+)pattern::(error|warning|notice)::)Claude Engine: 12 → 5 patterns (58% reduction)
Codex Engine: 16 → 7 patterns (56% reduction)
YYYY-MM-DDTHH:MM:SS.sssZ ERROR messageYYYY-MM-DDTHH:MM:SS.sssZ WARN messageCopilot Engine: 40 → 13 patterns (67% reduction)
✗failed command indicatorTesting
All tests updated to reflect the new pattern philosophy and continue to pass:
Impact
Original prompt
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.