Follow Discord
Sweep 22 Oct 2026 · 21:04Z Build v2.1.309 528 read Stable v2.1.308 Latest v2.1.309 Next v2.1.309 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.309, published 13 hours before 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+10added
Lines−10removed
From line 277 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits29to 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```text Output wrap
280```json Output
281281{
282282 "id": "msg_01UZ3bXcQH8mTqNhVfL9eK2p",
283283 "type": "message",
from line 347
347347 
348348A response with a three-action batch looks like this:
349349 
350```text wrap
350```json
351351{
352352 "role": "assistant",
353353 "content": [
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 ```text wrap
764 ```json
765765 {
766766 "type": "tool_use",
767767 "id": "toolu_01Qg8m3XqC5aRy7tD2eS4jUg",
from line 773
773773 
774774 Drag from one point to another:
775775 
776 ```text wrap
776 ```json
777777 {
778778 "type": "tool_use",
779779 "id": "toolu_01Ed6j9VnA3yPw5rB8cQ2gSe",
from line 788
788788 
789789 Scroll down three clicks of the wheel:
790790 
791 ```text wrap
791 ```json
792792 {
793793 "type": "tool_use",
794794 "id": "toolu_01Yc5h8UmZ2xNv4qA7bP9fRd",
from line 804
804804 
805805 Press Tab four times:
806806 
807 ```text wrap
807 ```json
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 ```text wrap
819 ```json
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 ```text wrap
831 ```json
832832 {
833833 "type": "tool_use",
834834 "id": "toolu_01Ekh3vqB6yTs2mNc4Rw8pLd",
from line 887
887887 
888888To add other tools alongside computer use, include them in the same `tools` array. The [Quick start](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#quick-start) section shows this pattern with the [bash tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/bash-tool) and [text editor tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/text-editor-tool). You can add your own [custom tool definitions](https://platform.claude.com/docs/en/agents-and-tools/tool-use/define-tools) the same way.
889889 
890For tasks that stay inside webpages, you can also [declare the browser use tool in the same request](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#combine-with-other-tools): the two toolsets work independently, each in its own coordinate frame, and calls to members that share a name, such as `screenshot` or `key`, are told apart by `toolset_name`.
890For tasks that stay inside webpages, you can also [declare the browser use tool in the same request](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#combine-with-other-tools). The two toolsets work independently, each in its own coordinate frame. The `toolset_name` value distinguishes calls to members that share a name, such as `screenshot` or `key`.
891891 
892892### Build a custom computer use environment
893893 
from line 1859
18591859 ```typescript TypeScript
18601860 async function clickAndWait(x: number, y: number, waitMs = 500): Promise<void> {
18611861 clickAt(x, y);
1862 await setTimeout(waitMs); // Allow UI to update
1862 await new Promise((resolve) => setTimeout(resolve, waitMs)); // Allow UI to update
18631863 }
18641864 ```
18651865 
Feedback