-
Notifications
You must be signed in to change notification settings - Fork 426
feat(tool runner): add infinite compaction detection #1091
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next
Are you sure you want to change the base?
feat(tool runner): add infinite compaction detection #1091
Conversation
|
There's a merge conflict FYI |
| consecutive_compactions += 1 | ||
| log.debug(f"Consecutive compactions: {consecutive_compactions}") | ||
| if consecutive_compactions >= 2: | ||
| raise RuntimeError("Infinite compaction detected: two consecutive iterations performed compaction") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: we should include something actionable in the error message, what could the user do to prevent this?
Also minor but
| raise RuntimeError("Infinite compaction detected: two consecutive iterations performed compaction") | |
| raise RuntimeError("Potentially infinite compaction detected: two consecutive iterations performed compaction") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This happens mostly because the threshold number is very small. If you set it too low, some extra tokens, for example tool definitions won’t be affected by compaction and won’t fit within that threshold.
5302f27 to
9b5ab24
Compare
No description provided.