Skip to content

fix(agents): support Sonnet 5.5 computer toolsets - #733

Closed
shfunc wants to merge 3 commits into
mainfrom
ilya/sonnet-55-computer-tools
Closed

shfunc wants to merge 3 commits into
mainfrom
ilya/sonnet-55-computer-tools

Conversation

@shfunc

@shfunc shfunc commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Sonnet 5.5 computer-use runs fail before their first action because the Claude API no longer accepts the legacy computer declaration. Select computer_toolset_20260801 for Sonnet 5.5 on the Claude API/HUD gateway, preserve action namespaces in requests and results, execute batches in order, and report skipped actions after a failed computer call. Bedrock and older models retain their existing schemas.

Screenshot/zoom sizing and coordinate mapping meet the toolset's image contract. Key repeat, modifier holds and horizontal scrolling follow its action semantics. Tool results share one user turn and one cache breakpoint. Raise the Anthropic SDK minimum to 0.125.0 for its typed toolset contract.

Validation: 383 focused agent/shared-type tests pass against isolated current Anthropic 1.15.0 / HTTPX2 2.15.1, including an actual Anthropic SDK HTTP/SSE codec boundary, mixed custom/native tools, batch failure, geometry and legacy behavior. Ruff, formatting, ty and diff checks pass. Full local repository tests were stopped on sandbox socket-bind permission failures; GitHub CI is the full-suite gate. A single private LiveWeb EPA attempt completed locally with rubric score 1.0, 32 namespaced computer actions and zero tool/grade errors. Raw server capture was credential-clean. Its platform status became cancelled during cleanup, so it remains a private protocol validation rather than a promoted platform sample while that lifecycle discrepancy is investigated. Hosted worker rollout remains necessary before the platform's hosted solver uses the fix.

Based on Anthropic's Sonnet 5.5 migration guide and computer toolset contract.

Independent follow-up to featured templates #731. SDK credential redaction is separate in #732.


Note

Medium Risk
Changes Claude computer-use wire format, batch execution, and coordinate/screenshot handling on a critical agent path; mitigated by broad tests and legacy/Bedrock preservation.

Overview
Adds Claude Sonnet 5.5 computer-use via Anthropic’s native computer_toolset_20260801 protocol (Claude API / HUD gateway), while Bedrock and older Claude models keep their existing computer schemas.

ClaudeAgent maps namespaced tool-use blocks to a single computer tool, round-trips toolset_name on results, runs batched actions in order and skips the rest of the computer batch after a failure, merges multiple tool results into one user message with a single cache breakpoint, and allows parallel tool use when the new toolset is registered. ToolAgent exposes _tool_spec, _execute_tool_calls, and _append_tool_result hooks for this behavior; MCPToolCall gains toolset_name / provider_name metadata.

The computer tool adds ComputerGeometry for screenshot/zoom sizing (2000 px edge and visual-token limits) and pointer coordinate remapping, toolset-specific action semantics (hold_key, repeat, duration, horizontal scroll via RFB wheel buttons), and mostly text "OK" responses instead of post-action screenshots for the new protocol. Anthropic SDK minimum is raised to 0.125.0; agent docs describe the migration.

Reviewed by Cursor Bugbot for commit 78cd7c8. Bugbot is set up for automated code reviews on this repo. Configure here.

@shfunc
shfunc marked this pull request as ready for review October 20, 2026 18:19
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T18:23:26.896096Z 7acf957 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7acf957edb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread hud/agents/claude/agent.py Resolved
@jdchawla29

Copy link
Copy Markdown
Collaborator

Superseded or resolved by #700.

@jdchawla29 jdchawla29 closed this Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants