You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
◐ Caching cosmic calculations... 2025-02-05T22:45:37.704356Z ERROR goose::agents::truncate: Error: Request failed: Request failed with status: 400 Bad Request. Message: messages.156: Did not find 1 tool_result block(s) at the beginning of this message. Messages following tool_use blocks must begin with a matching number of tool_result blocks.
at crates/goose/src/agents/truncate.rs:279
Ran into this error: Request failed: Request failed with status: 400 Bad Request. Message: messages.156: Did not find 1 tool_result block(s) at the beginning o
f this message. Messages following tool_use blocks must begin with a matching number of tool_result blocks..
Please retry if you think this is a transient or recoverable error.
The text was updated successfully, but these errors were encountered:
jasonkneen
added a commit
to jasonkneen/maverick
that referenced
this issue
Feb 5, 2025
Fixesblock#1102
Update error handling in `TruncateAgent` to handle missing `tool_result` blocks.
* **`crates/goose/src/agents/truncate.rs`**
- Ensure messages following `tool_use` blocks begin with matching `tool_result` blocks.
- Add logic to provide a descriptive error message when a `tool_result` block is missing.
* **`crates/goose/src/message.rs`**
- Add a new function `has_tool_result` to check if a message contains a `tool_result` block.
* **`crates/goose/tests/truncate_agent.rs`**
- Add a new test case to verify the handling of missing `tool_result` blocks.
---
For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/block/goose/issues/1102?shareId=XXXX-XXXX-XXXX-XXXX).
◐ Caching cosmic calculations... 2025-02-05T22:45:37.704356Z ERROR goose::agents::truncate: Error: Request failed: Request failed with status: 400 Bad Request. Message: messages.156: Did not find 1
tool_result
block(s) at the beginning of this message. Messages followingtool_use
blocks must begin with a matching number oftool_result
blocks.at crates/goose/src/agents/truncate.rs:279
Ran into this error: Request failed: Request failed with status: 400 Bad Request. Message: messages.156: Did not find 1
tool_result
block(s) at the beginning of this message. Messages following
tool_use
blocks must begin with a matching number oftool_result
blocks..Please retry if you think this is a transient or recoverable error.
The text was updated successfully, but these errors were encountered: