Pre-checks
Deployment Method
Source (setup.sh)
Steps to Reproduce
- Create a session with an agent that has tools enabled.
- Send enough messages so that the conversation history contains many tool-call rounds (close to
context_window_size).
- Send a new message — the LLM call fails with HTTP 400.
- Every subsequent message in the same session also fails.
Expected vs Actual Behavior
Conversation truncation should never produce an orphaned tool_result block. If a truncation boundary falls inside a tool-call pair, the incomplete pair should be dropped.
Logs / Screenshots
No response
Pre-checks
Deployment Method
Source (setup.sh)
Steps to Reproduce
context_window_size).Expected vs Actual Behavior
Conversation truncation should never produce an orphaned
tool_resultblock. If a truncation boundary falls inside a tool-call pair, the incomplete pair should be dropped.Logs / Screenshots
No response