fix(cli): exclude scoped instructions from SWE-Pruner - #12052
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Reviewed the Files Reviewed (3 files)
Reviewed by claude-sonnet-5 · Input: 40 · Output: 16.3K · Cached: 1.2M Review guidance: REVIEW.md from base branch |
* fix(cli): preserve scoped instructions during pruning * test(cli): cover CRLF scoped instructions
Directory-scoped AGENTS.md files are appended to read output before SWE-Pruner runs. Successful pruning could remove those instructions while preserving metadata that prevents them from being attached again, leaving the main agent without applicable rules.\n\nThis change separates generated instruction reminders from the prunable file body, sends only source content to the skimmer, and restores the reminders byte-for-byte afterward. Inconsistent reminder metadata fails open to the original output, while pruning metrics continue to account for every line returned to the main agent.