Commit e5efe3a
committed
fix(tools): use modified messages list in async compaction
The async `_check_and_compact()` method was incorrectly using
`self._params["messages"]` instead of the local `messages` variable
when building the compaction request.
This caused the async version to ignore all the filtering logic that
removes tool_use blocks from the last assistant message before
compaction, potentially sending invalid API requests.
The sync version correctly uses `*messages` (line 203), while the
async version was using `*self._params["messages"]` (line 454).1 parent 9b5ab24 commit e5efe3a
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
451 | 451 | | |
452 | 452 | | |
453 | 453 | | |
454 | | - | |
| 454 | + | |
455 | 455 | | |
456 | 456 | | |
457 | 457 | | |
| |||
0 commit comments