Random 'No tool output found ' exception from the endpoint side

Open
#22 2 comments 1 reaction 1 assignee View on GitHub

@balapv is already working on this.

Since Apr 30, 2025.

Assessment

This issue has not been assessed yet.

Description

While running the latest code from the repo, I get below error from the computer-use-preview endpoint:

  File "C:\Work\python-projects\ComputerUse\.venv\Lib\site-packages\openai\_base_client.py", line 1023, in _request
    raise self._make_status_error_from_response(err.response) from None
openai.BadRequestError: Error code: 400 - {'error': {'message': 'No tool output found for computer call call_4.', 'type': 'invalid_request_error', 'param': 'input', 'code': None}}

The issue here is that the case is quite random - sometimes it throws at the very beginning and the other times it does after a few actions. I cannot figure out which condition makes the problem. I am using the same CUA.py code of the latest version in this repo. I just added the print part to see what's going on.

(.venv) c:\Work\python-projects\ComputerUse\computer-use-model\computer-use>python main.py --instruction "Open Chrome browser and search the weather of Bellevue WA and summarize the information for this week"
User: Open Chrome browser and search the weather of Bellevue WA and summarize the information for this week
***computer_call_output***
call_id: call_1
screenshot {}
***calling client***
call_id: call_2

Action: Launching Chrome browser on desktop
***computer_call_output***
call_id: call_2
double_click {'x': 45, 'y': 140}
***calling client***
call_id: call_3

***computer_call_output***
call_id: call_3
wait {}
***calling client***
call_id: call_zvCUYd0VDqkNxYhJ1Kl7RUao

Action: Searching weather for Bellevue, WA
***computer_call_output***
call_id: call_4
type {'text': 'weather Bellevue WA'}
***calling client***
Traceback (most recent call last):
....
Dominant language
Python
Stars
76
Forks
37
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Azure-Samples/computer-use

All issues in Azure-Samples/computer-use

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.