-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Tool use error when resuming session: tool_use ids were found without tool_result blocks immediately after #2951
Copy link
Copy link
Closed
Labels
Description
I received this error when resuming my session.
Request failed: Request failed with status: 400 Bad Request. Message: messages.2:
tool_useids were found withouttool_resultblocks immediately after: toolu_01R5cWox3wKwtTMbyKk7GZno. Eachtool_useblock must have a correspondingtool_resultblock in the next message..
Here is the session .json file:
{"working_dir":"/home/ben/Projects/redacted","description":"Debugging Celery Redis connectivity","message_count":42,"total_tokens":36145,"input_tokens":36098,"output_tokens":47,"accumulated_total_tokens":1342347,"accumulated_input_tokens":1337540,"accumulated_output_tokens":4807}
{"role":"user","created":1750104807,"content":[{"type":"text","text":"I'll summarize the conversation about diagnosing Celery task processing issues:\n\nThe conversation began with a diagnostic plan to identify why Celery tasks weren't being processed in a Docker-based application. The assistant examined the project structure, focusing on the Docker Compose configuration that showed Redis as the message broker and proper Celery services configuration.\n\nKey investigations included:\n1. Task verification showing tasks were being submitted but failing immediately (status FAILURE)\n2. Redis queue inspection revealing tasks weren't appearing in the queue\n3. Celery worker logs showing the worker was properly configured to consume from the \"celery\" queue\n4. Examination of task definition in devdocs/tasks.py showing proper task registration\n\nThe assistant attempted further debugging by restarting the Celery worker with more verbose logging, but encountered technical issues with the conversation interface that prevented completion of the diagnosis.\n\nThe conversation indicated the issue might be one of:\n1. Tasks failing immediately upon execution\n2. Tasks being routed to a different queue than expected\n3. A configuration issue with the Redis message broker\n\nThe investigation was in progress but incomplete when the conversation ended due to technical difficulties."}]}
{"role":"assistant","created":1750104434,"content":[{"type":"toolRequest","id":"toolu_01R5cWox3wKwtTMbyKk7GZno","toolCall":{"status":"success","value":{"name":"developer__shell","arguments":{"command":"docker logs -f celery_debug"}}}}]}
{"role":"user","created":1750104464,"content":[{"type":"toolResponse","id":"toolu_01R5cWox3wKwtTMbyKk7GZno","toolResult":{"status":"error","error":"Execution failed: Execution failed: Interrupted by the user to make a correction"}}]}
{"role":"user","created":1750104818,"content":[{"type":"text","text":"I've stopped the celery service. Can you test to find the cause of the task not appearing in the redis queue? We can rule out the worker picking it up since it's now stopped."}]}
{"role":"assistant","created":1750104820,"content":[{"type":"text","text":"Ran into this error: Request failed: Request failed with status: 400 Bad Request. Message: messages.2: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_01R5cWox3wKwtTMbyKk7GZno. Each `tool_use` block must have a corresponding `tool_result` block in the next message..\n\nPlease retry if you think this is a transient or recoverable error."}]}
{"role":"user","created":1750104829,"content":[{"type":"text","text":"Please tell me the summary."}]}
{"role":"assistant","created":1750104830,"content":[{"type":"text","text":"Ran into this error: Request failed: Request failed with status: 400 Bad Request. Message: messages.2: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_01R5cWox3wKwtTMbyKk7GZno. Each `tool_use` block must have a corresponding `tool_result` block in the next message..\n\nPlease retry if you think this is a transient or recoverable error."}]}
Reactions are currently unavailable