Skip to content

Make glob/grep truncation explicit and use the calibrated estimate in /compact - #8

Open
uuzzrm wants to merge 1 commit into
nullcache:mainfrom
uuzzrm:fix/search-truncation-visibility
Open

Make glob/grep truncation explicit and use the calibrated estimate in /compact#8
uuzzrm wants to merge 1 commit into
nullcache:mainfrom
uuzzrm:fix/search-truncation-visibility

Conversation

@uuzzrm

@uuzzrm uuzzrm commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Two small honesty fixes, both about numbers the agent sees.

  1. glob and grep both stop walking at a file cap (20k / 5k), but neither said anything about it. On a big repo the model gets a result that just... ends, and reasonably concludes there are no more files. They now append an explicit "search capped at N files, results truncated" note — and grep says the search was capped even when nothing matched, so a truncated search can't masquerade as "no matches".

  2. /compact displayed the raw char-based estimate while the compressor itself decides on the calibrated measure — two numbers that could disagree by a lot after a real conversation. It now uses context.measure() for before/after.

Truncation needs >20k files to trigger, so I couldn't write a cheap regression test for that branch — added normal-path tests for both tools instead so the refactor itself is covered.

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