fix compaction in tool loops
FYI, noticed one more issue:
Since I changed manual compaction to actually send a message, we're now picking up that message (as the most recent user message) and moving it after the compaction.
Maybe another argument for just passing in a manual_compaction flag and skipping the whole last user search entirely; I think otherwise we always just want to find the most recent user message and might not need to special case the last one.
should we close this one now? or do we need to copy the test?
should we close this one now? or do we need to copy the test?
Yeah closing. Moved the test to https://github.com/block/goose/pull/5618
Still porting a little more functionality there