Skip to content

Auto compaction drops in-flight orphan tool calls #186

Description

@wangtsiao

When auto compaction runs after the model emits tool calls but before their tool results arrive, the pending calls disappear from the compacted context. This affects all tools.

The cause is normalize::pair_tool_call_items, which removes any ToolCall without a matching ToolCallOutput.

Expected behavior: preserve in-flight tool calls across compaction, or defer compaction until their results arrive.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions