Follow Discord
Sweep 22 Oct 2026 · 04:32Z Build v2.1.308 527 read Stable v2.1.308 Latest v2.1.308 Next v2.1.308 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · api

computer-use-tool changedagents-and-tools/tool-use/computer-use-tool

Nearest release: v2.1.308, published 2 hours after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Recorded here
Lines+11added
Lines−11removed
From line 277 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits26to this page, all time

The whole hunk

from line 277, old and new numbered
/
lines
from line 277
277277 
278278When Claude acts on the desktop, the response has a `stop_reason` of `tool_use` and contains one or more member `tool_use` blocks, each naming a member tool and carrying `"toolset_name": "computer"`. Partway through this task, after Claude has received a screenshot of the desktop, a response might look like this:
279279 
280```json Output
280```text Output wrap
281281{
282282 "id": "msg_01UZ3bXcQH8mTqNhVfL9eK2p",
283283 "type": "message",
from line 347
347347 
348348A response with a three-action batch looks like this:
349349 
350```json
350```text wrap
351351{
352352 "role": "assistant",
353353 "content": [
from line 437
437437 
438438Computer use requires a sandboxed computing environment where Claude can safely interact with applications and the web. This environment includes:
439439 
4401. **Virtual display:** A virtual X11 display server (using Xvfb) that renders the desktop interface Claude sees through screenshots and controls with mouse/keyboard actions.
4401. **Virtual display:** A virtual X11 display server (using Xvfb) that renders the desktop interface that Claude receives as screenshots and controls with mouse/keyboard actions.
441441 
4424422. **Desktop environment:** A lightweight UI with window manager (Mutter) and panel (Tint2) running on Linux, which provides a consistent graphical interface for Claude to interact with.
443443 
from line 706
706706### Optimize model performance with prompting
707707 
7087081. Specify simple, well-defined tasks and provide explicit instructions for each step.
7092. Claude sometimes assumes outcomes of its actions without explicitly checking their results. To prevent this you can prompt Claude with `After each step, take a screenshot and carefully evaluate if you have achieved the right outcome. State in one sentence what the screenshot shows and whether the step succeeded. If it didn't, try again. Only when you confirm a step was executed correctly should you move on to the next one.`
7092. Claude sometimes acts as if its actions succeeded without explicitly checking their results. To prevent this, you can prompt Claude with `After each step, take a screenshot and carefully evaluate if you have achieved the right outcome. State in one sentence what the screenshot shows and whether the step succeeded. If it didn't, try again. Only when you confirm a step was executed correctly should you move on to the next one.`
7107103. Some UI elements (such as dropdowns and scrollbars) might be tricky for Claude to manipulate using mouse movements. If you experience this, try prompting the model to use keyboard shortcuts.
7117114. For repeatable tasks or UI interactions, include example screenshots and tool calls of successful outcomes in your prompt.
7127125. If you need the model to log in, provide it with the username and password in your prompt inside XML tags such as `<robot_credentials>`. Using computer use within applications that require login increases the risk of bad outcomes as a result of prompt injection. Review [Mitigate jailbreaks and prompt injections](https://platform.claude.com/docs/en/test-and-evaluate/strengthen-guardrails/mitigate-jailbreaks) before providing the model with login credentials.
from line 761
761761 
762762 Shift+click at a position, for example, to extend a selection. Unlike `hold_key`, `text` holds the modifiers only for the duration of that click or scroll:
763763 
764 ```json
764 ```text wrap
765765 {
766766 "type": "tool_use",
767767 "id": "toolu_01Qg8m3XqC5aRy7tD2eS4jUg",
from line 773
773773 
774774 Drag from one point to another:
775775 
776 ```json
776 ```text wrap
777777 {
778778 "type": "tool_use",
779779 "id": "toolu_01Ed6j9VnA3yPw5rB8cQ2gSe",
from line 788
788788 
789789 Scroll down three clicks of the wheel:
790790 
791 ```json
791 ```text wrap
792792 {
793793 "type": "tool_use",
794794 "id": "toolu_01Yc5h8UmZ2xNv4qA7bP9fRd",
from line 804
804804 
805805 Press Tab four times:
806806 
807 ```json
807 ```text wrap
808808 {
809809 "type": "tool_use",
810810 "id": "toolu_01Sb4g7TkY9wLu3pX6zM8eQc",
from line 816
816816 
817817 Zoom in to inspect a region at full resolution:
818818 
819 ```json
819 ```text wrap
820820 {
821821 "type": "tool_use",
822822 "id": "toolu_01Kf7k2WpB4zQx6sC9dR3hTf",
from line 828
828828 
829829 Report the cursor position. Answer this call with a short text result that gives the position in screenshot pixels, for example, `X=512, Y=384`:
830830 
831 ```json
831 ```text wrap
832832 {
833833 "type": "tool_use",
834834 "id": "toolu_01Ekh3vqB6yTs2mNc4Rw8pLd",
from line 1597
15971597Screenshots and zoom images that you return to the computer use toolset must already fit within your model's [image size limits](https://platform.claude.com/docs/en/build-with-claude/vision#evaluate-image-size): the toolset takes no display dimensions and the API doesn't downscale for you, so an oversized `tool_result` image is rejected with a validation error. Because Claude returns coordinates in the pixel space of the image it receives, keep the scale factor you used so you can map those coordinates back to your screen.
15981598 
15991599<Note>
1600 Limits vary by model. Claude Opus 4.7 and later models, including every model that supports `computer_toolset_20260801`, accept up to 2576 pixels on the long edge and 4,784 visual tokens total (`⌈width / 28⌉ × ⌈height / 28⌉`, approximately 3.75 megapixels); earlier models accept up to 1568 pixels on the long edge and approximately 1.15 megapixels total (see [Resolution and token cost](https://platform.claude.com/docs/en/build-with-claude/vision#evaluate-image-size) for each model's tier). The following example uses the earlier-model 1568 px / 1.15 MP limits. For a high-resolution-tier model, size to the visual-token limit rather than a pixel total, for example with the resize helper in [Resize your image before uploading](https://platform.claude.com/docs/en/build-with-claude/vision-coordinates#resize-your-image-before-uploading).
1600 Limits vary by model. Claude Opus 4.7 and later models, including every model that supports `computer_toolset_20260801`, accept up to 2,576 pixels on the long edge and 4,784 visual tokens total (`⌈width / 28⌉ × ⌈height / 28⌉`, approximately 3.75 megapixels); earlier models accept up to 1,568 pixels on the long edge and approximately 1.15 megapixels total (see [Resolution and token cost](https://platform.claude.com/docs/en/build-with-claude/vision#evaluate-image-size) for each model's tier). The following example uses the earlier-model 1,568 px / 1.15 MP limits. For a high-resolution-tier model, size to the visual-token limit rather than a pixel total, for example with the resize helper in [Resize your image before uploading](https://platform.claude.com/docs/en/build-with-claude/vision-coordinates#resize-your-image-before-uploading).
16011601</Note>
16021602 
16031603If your screen is larger than the limit, resize each screenshot before returning it and scale Claude's returned coordinates back to the original screen space. Because the toolset takes no display dimensions, the resize and the coordinate scaling in your application code are all you need:
Feedback