block / goose

Goose is a developer agent that operates from your command line to help you do the boring stuff.
https://block.github.io/goose/
Apache License 2.0
112 stars 17 forks source link

invalid request after failure #33

Closed michaelneale closed 1 month ago

michaelneale commented 1 month ago

sometimes after a failure, goose will be unable to continue in its current session:

{"error":"Received error from openai","external_model_message":{"error":{"message":"An assistant message with 'tool_calls' must be followed by tool messages responding to each 'tool_call_id'. The following tool_call_ids did not have response
messages: call_ZJrQE9m4oqSXs1KwqTYI5urC","type":"invalid_request_error","param":"messages.[27].role","code":null}}}

The session will need to be wound back a bit to known good state.

This typically happens after long sessions, when there are timeouts/failures elsewhere.

@lukealvoeiro @baxen I think we need to find a more categorical fix for this as criteria for more wide adoption

michaelneale commented 1 month ago

FYI @lukealvoeiro is working on it as part of checkpoint fixing

michaelneale commented 1 month ago

this looks nicely resolved now