AnthropicAdapter only converts provider actions to SDK actions.
Install the provider extra
ANTHROPIC_API_KEY in the placed Function. Keep it out of the desktop Sandbox.
Select matching tool versions
The adapter defaults to
computer_20251124. Set enable_zoom=True when you want zoom with that version.
Keep the loop inside the placed Function
Follow the session handoff guide. Borrow once around the complete Messages API loop.stop_reason is tool_use. Return all matching tool results in the next user message.
Preserve hosted-tool order
Execute hosted computer calls in response order. Usecomputer.step() for actions that need an immediate screenshot.
- Return cursor coordinates as text for
cursor_position. - Reuse the native image from
screenshotorzoomwhen present. - Avoid a duplicate trailing image after a native image action.
- Keep separate hosted calls separate.
computer.step() call.

