一、核心概念澄清
在深入技术细节之前,首先厘清两个容易混淆的事实:
简单说:Claude 的所有视觉模型都内置了 computer use 能力;而 OpenAI 经历了从「专用 CUA 模型」到「GPT-5.4 通用模型原生支持」的演进。
二、架构全景对比
2.1 整体架构图
┌─────────────────────────────────────────────────────────────────────────┐
│ Claude Code 架构 │
│ │
│ ┌──────────────┐ tool_use 请求 ┌─────────────┐ 截图/动作执行 │
│ │ Claude API │ ───────────────▶ │ Agent Loop │ ──────┐ │
│ │ (Messages │ ◀─────────────── │ (用户端) │ ◀─────┤ │
│ │ API + Beta) │ tool_result └─────────────┘ │ │
│ └──────────────┘ ┌────────┴──────┐ │
│ tools: [computer_20251124, bash, text_editor] │ Sandbox 环境 │ │
│ Beta Header: "computer-use-2025-01-24" │ Xvfb + Mutter │ │
│ │ + Firefox/... │ │
│ 能力来源:模型基础视觉理解 + 工具调用对齐 └────────────────┘ │
└─────────────────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────────────────┐
│ OpenAI Codex / GPT-5.4 架构 │
│ │
│ ┌──────────────┐ computer_call 请求 ┌─────────────┐ 截图/动作执行 │
│ │ Responses │ ─────────────────▶ │ Agent Loop │ ──────┐ │
│ │ API │ ◀───────────────── │ (用户端) │ ◀─────┤ │
│ │ │ computer_call_output└─────────────┘ │ │
│ └──────────────┘ ┌────────┴──────┐ │
│ tools: [computer_use_preview] │ Sandbox 环境 │ │
│ 参数: display_width, display_height, environment│ 默认禁网络 │ │
│ │ │ │
│ 能力来源:GPT-5.4 原生视觉+推理+RL 训练 └────────────────┘ │
└─────────────────────────────────────────────────────────────────────────┘
2.2 Agent Loop 对比
两者都采用 模型请求动作 → 用户执行 → 返回结果 → 循环 的架构,但 API 协议不同。
Claude(Messages API):
# 用户代码控制完整循环
while True:
response = client.beta.messages.create(
model="claude-opus-4-6",
tools=[...], # 工具定义在每次请求中
messages=messages, # 显式传递完整消息历史
betas=["computer-use-2025-01-24"],
thinking={"type": "enabled", "budget_tokens": 2000}
)
# 检查 stop_reason == "tool_use"
# 执行工具 → 构造 tool_result → 追加到 messages
OpenAI(Responses API):
# 可用 previous_response_id 自动链接上下文
response = client.responses.create(
model="gpt-5.4",
previous_response_id=prev_id, # 自动管理 history
tools=[{...}],
input=[...current step...] # 只传本轮输入
)
# 检查 output 中的 computer_call
# 执行动作 → 构造 computer_call_output → 下轮请求
关键差异:
- Claude 显式传递完整 messages 数组
- OpenAI 支持 previous_response_id 自动链接上下文,更省 token
- Claude 用 tool_result 类型返回结果;OpenAI 用 computer_call_output 类型
三、Computer Tool 能力对比
3.1 动作集对比
Claude 优势:动作集更丰富(约 17 种 vs 9 种核心),支持 hold_key(如 Ctrl+点击)、triple_click、鼠标按键精确控制(按下/释放)等细粒度操作。
OpenAI 优势:environment 参数显式告知模型当前环境类型,有助于模型选择正确的 GUI 交互策略。
3.2 工具声明方式
# Claude — tools 数组声明
tools = [{
"type": "computer_20251124", # 版本化工具类型
"name": "computer",
"display_width_px": 1280, # 坐标空间声明
"display_height_px": 720,
"display_number": 1,
"enable_zoom": True # 可选功能开关
}]
# OpenAI — tools 数组声明(Responses API)
tools = [{
"type": "computer_use_preview",
"display_width": 1024, # 坐标空间
"display_height": 768,
"environment": "browser" # 环境类型提示
}]
四、底层模型能力对比
4.1 模型演进路线
4.2 视觉输入能力
关键洞察:两边模型内部都会对超分辨率图片进行下采样,但处理方式不同:
- Claude 是隐式处理:API 内部自动缩放后返回对应坐标
- GPT-5.4 引入显式 detail level 选择,给开发者更多控制
Claude 官方特别强调:必须在发送前手动将截图缩放到 API 限制内,否则 API 会静默下采样导致「模型看到的图片」和「它返回的坐标空间」不匹配——这是 click 不准的第一大原因。
4.3 基准测试成绩
⚠️ 注意:这些数字来自不同时间点的官方发布,具体测试设置(最大步数、分辨率)可能有差异,不完全可比。
五、安全机制对比
5.1 Prompt Injection 防护
5.2 沙箱隔离
六、技术实现细节
6.1 坐标缩放的关键陷阱
两边都需要开发者处理的问题:
截图原始分辨率 (screen_w × screen_h)
↓ 下采样
模型看到的图片 (display_w × display_h)
↓ 返回坐标
模型输出点击坐标 (click_x, click_y) —— 注意这是 display 坐标系!
↓ 缩放回去
实际执行位置 (click_x * screen_w/display_w, click_y * screen_h/display_h)
Claude 官方给出的代码模式:
# 模型返回 display 坐标系的坐标,需要缩放回实际屏幕
scale_x = screen_w / display_w # display_w 是传给 API 的值
scale_y = screen_h / display_h
actual_x = int(click_x * scale_x)
actual_y = int(click_y * scale_y)
6.2 Claude 的 enable_zoom 机制
Claude 4.6+ 新增 enable_zoom: True 功能:
- 模型可以自主决定「放大」某个屏幕区域
- 针对密集 UI 中的小目标(checkbox、系统托盘图标等)特别有效
- 放大逻辑在模型内部完成,开发者无需额外处理
6.3 OpenAI Responses API 的 previous_response_id
GPT-5.4 引入的对话上下文管理机制:
# 无需手动拼接消息历史
response1 = client.responses.create(model="gpt-5.4", ...)
response2 = client.responses.create(
model="gpt-5.4",
previous_response_id=response1.id, # 自动链接
input=[...] # 只传本轮
)
这比 Claude 每次显式传递完整 messages 数组更高效,节省 token。
6.4 Codex 的组合能力
Codex(GPT-5.4)可以同时使用多种工具:
- bash — 执行 shell 命令
- computer — 视觉+鼠标键盘
- file_search — 文件搜索
- web_search — 网页搜索
- 自定义 MCP 工具
Claude Code 类似,可以组合 computer + bash + text_editor 三个 beta 工具。
七、开发体验对比
八、总结:谁更好?
8.1 技术特性对比矩阵
8.2 选择建议
选 Claude 如果:
- 需要丰富的鼠标/键盘细粒度控制(hold_key、triple_click 等)
- 目标 UI 密集、小目标多(enable_zoom 能显著提升)
- 需要开源参考实现快速上手
选 GPT-5.4 如果:
- 追求最高 OSWorld 等 benchmark 成绩
- 需要处理高分辨率原始截图(10.24MP)
- 希望 API 更标准、上下文管理更高效
- 已经在使用 Codex 或 OpenAI Agents SDK
两者共同的工程挑战:
- 坐标缩放 —— 模型坐标系 vs 实际屏幕坐标系的对齐是 click 准确率的基础
- 图片下采样 —— 必须在发送前手动控制,不能依赖 API 自动处理
- Agent Loop 终止条件 —— 需要设置最大迭代次数防止无限循环
- Prompt injection 防护 —— 两边都有机制,但开发者仍需做好隔离
九、核心结论
两者底层都是「视觉模型理解截图 → 输出鼠标/键盘坐标 → 用户端执行 → 返回新截图」的 Agent Loop 范式,但设计哲学不同:
- Claude:给模型更多动作选项,让它用丰富词汇表达意图(17 种动作 + enable_zoom)
- OpenAI:用更好的训练和更高的分辨率让模型看清楚(RL 训练 + 10.24MP 输入)
选择哪一个更多取决于你的具体场景和已有的技术栈。
Sources
- Anthropic Computer Use API Docs — docs.anthropic.com/en/docs/age…
- Anthropic Best Practices for Computer and Browser Use — claude.com/blog/best-p…
- OpenAI Computer-Using Agent 发布 — openai.com/index/compu…
- OpenAI Introducing GPT-5.4 — openai.com/index/intro…
- OpenAI Agents SDK Computer 接口 — openai.github.io/openai-agen…
- Azure OpenAI Computer Use — learn.microsoft.com/en-us/azure…
- OpenAI Introducing Upgrades to Codex — openai.com/index/intro…
- OSWorld 2.0 Benchmark — arxiv.org/abs/2606.29…
本文由 AI图鉴自动抓取并翻译,版权归原作者所有;如需查看原文请点下方链接。
I. Core conceptual clarifications
Before entering into further technical details, two easily confused facts are identified:
Briefly: Claude has built into all visual models the capability of the computer use; and Open AI has evolved from a "special CUA model" to a "generic support for GPT-54 generic models".
II. THE STRUCTURE OVERVIEW
2.1 Overall structure
┌─────────────────────────────────────────────────────────────────────────┐
Claude Code
│ │
-
│ │ Claude API │ ───────────────▶ │ Agent Loop │ ──────┐ │
Messages -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
│ │ API + Beta) │ tool_result └─────────────┘ │ │
│ └──────────────┘ ┌────────┴──────┐ │
== sync, corrected by elderman == @elder man
│ Beta Header: "computer-use-2025-01-24" │ Xvfb + Mutter │ │
│ │ + Firefox/... │ │
Source of capability: Model based visual understanding + tool call alignment -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
└─────────────────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────────────────┐
Open AI Codex / GPT-5.4 Structure
│ │
{\cHFFFFFF}{\cH00FFFF} {\cHFFFFFF}{\cH00FFFF} {\cHFFFFFF}{\cH00FFFF} {\cHFFFFFF}{\cH00FFFF} {\cHFFFFFF}{\cH00FFFF} {\cHFFFFFF}{\cH00FFFF}{\cH00FFFF} {\cHFFFFFF}{\cH00FFFF} {\cHFFFFFF}{\cH00FF00} {\cHFFFFFF}{\cH00FF00} {\cHFFFFFF}{\cH00FF00} {\cHFFFFFF}{\cH00FF00} {\cH00FF00} {\cHFFFFFF} {\cHFFFFFF}{\cH0000} Screenshot/action executed
│ │ Responses │ ─────────────────▶ │ Agent Loop │ ──────┐ │
API-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
│ │ │ computer_call_output└─────────────┘ │ │
│ └──────────────┘ ┌────────┴──────┐ │
│ tools: [computer use preview]
Parameters: display width, display health, environment│ Default disabled network │
│ │ │ │
Source: GPT-54.4 Native Visual + reasoning + RL training -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
└─────────────────────────────────────────────────────────────────────────┘
2.2 Age Loop Contrast
Both use the structure of the model request action application user executes the return result loop, but the API protocol is different.
Claude(Messages API):
# User code control complete loop
while True:
response = client.beta.messages.create(
model="claude-opus-4-6",
tools = [...], # Tool definition in each request
Messages=messages, # visible message history
betas=["computer-use-2025-01-24"],
thinking={"type": "enabled", "budget_tokens": 2000}
)
♪ Check stop reason ♪
# Execute Tool # Build tool tool tool result # Add to messages
OpenAI(Responses API):
# Available automatic link context
response = client.responses.create(
model="gpt-5.4",
# Automanage history
tools=[{...}],
Input=[...current step...]
)
# Check output
# Execute action # # # Construction request for next round
Key variances:
- Claude Visible Pass full messages array
- Open AI supports previous response id Autolink context, token
-Claude returns the result with the tool result type; Open AI uses the command call output type
III. COMPUTER TOOL CAPACITY COMPARATION
3.1 Action sets
Claude's Advantages: More action collections (approximately 17 vs 9 cores) support small particle size operations such as hold key (e.g. Ctrl+ click), Triple click, mouse button precise control (down/release).
Open AI Advantages: Visible information about the current environmental type of the model helps the model select the correct GUI interactive policy.
3.2 Instrument declaration
# Claude — array declaration of ols
tools = [{
# Version tool type
"name": "computer",
"display width px": 1280, # Coordinate Space Declaration
"display_height_px": 720,
"display_number": 1,
"enable zoom": True
}]
# Open AI — array statements
tools = [{
"type": "computer_use_preview",
"display width": 1024, # Coordinate space
"display_height": 768,
"environment": "browser"
}]
IV. Comparison of bottom model capabilities
4.1 Model evolution routes
4.2 Visual input capability
Key Insight: both models sample images of ultra-resolution, but in different ways:
- Claude is a hidden process: API automatically zoom in and back to the corresponding coordinates
- GPT-5.4 Introduction of visible detail level selection to give developers more control
Claude, in particular, stressed that it is necessary to zoom in the API limits manually before sending them, otherwise the API will silently take samples that do not match the "photograms seen in the model" and the "space of coordinates that it returns" - and that it will not be able to do so. That's the first big reason click wasn't allowed.
4.3 Baseline test achievements
Note: These figures are from official publish at different points in time and may vary from specific test settings (maximum step, resolution) and are not fully comparable.
V. Comparison of security mechanisms
5.1 Prompt Injection Protection
5.2 Sandbox isolation
VI. Technical realization details
6.1 Key trap for coordinate scaling
Both sides need to be addressed by developers:
Original resolution (screen w x screen h)
Sampling below
Pictures seen in the model (display w x display h)
↓ Return coordinates
Model output click coordinates (click x, click y) - Note that this is the display system!
Put it back.
Actual execution position (click x * screen w/display w, click y * screen h/display h)
Claude officially gave code mode:
# The model returns the coordinates of the display coordinates and needs to scale back the actual screen
scale x = screen w / display w #display w is the value passed to API
scale_y = screen_h / display_h
actual_x = int(click_x * scale_x)
actual_y = int(click_y * scale_y)
6.2 Claude ' s enabling zoom mechanism
Claude 4.6+ Add enabling zoom: True function:
- Models are self-determined to zoom in on some screen area.
- Especially effective for small targets in dense UIs (checkbox, system tray icons, etc.)
- The magnification logic is done inside the model and the developers don't need to process it extra.
6.3 Open AI Reponses API previous response id
GPT-54. The dialogue context management mechanism introduced:
# No need to spell the message history manually
response1 = client.responses.create(model="gpt-5.4", ...)
response2 = client.responses.create(
model="gpt-5.4",
# Autolink
Input = [...]
)
This is more efficient and saves token than Claude's complete message group at each appearance.
6.4 Codex 's Portfolio Capacity
Codex (GPT-5.4) uses a variety of tools:
- rash — Execute shell command
-computer - Visual + Mouse Keyboard
-file search - File Search
- Web search - Web Search
- Custom MCP tool
Claude Code is similar to the one that combines three beta tools.
VII. Development experience comparison
Summary: Who's better?
8.1 Comparison Matrix of Technical Characteristics
8.2 Selection Recommendations
Choose Claude if:
- Requires extensive mouse/keyboard fine particle control (hold key, triple click, etc.)
- Target UI intensive, small target.
- We need open source reference for quick start.
Select GPT-54 if:
- Seek the highest OSWorld et al. benchmark scores
- Need to process the original high resolution screenshot (10.24 MP)
- Hope API is more standard, context is more efficient.
- Already using Codex or Open AI Agents SDK
Common engineering challenges:
- Coordinate Zoom - The alignment of the model coordinate system vs. the actual screen coordinates is the basis for the click accuracy
- Samples under pictures - must be controlled manually before sending, cannot rely on API for automatic processing
-Agent Loop Terminator - Need to set a maximum number of iteratives to prevent unlimited circulation
- Prompt protection - both have mechanisms, but developers still need to be isolated.
IX. CORE CONCLUSIONS
The bottom of both are the Agent Loop paradigm for "View Model Understanding Caption → Output Mouse/Keyboard Coordinate → User Execute → Return to New Caption" but the design philosophy is different:
- Claude: give the model more action options to express intent in rich vocabulary (17 actions + available zoom)
- Open AI: Show the model with better training and higher resolution (RL Training + 10.24 MP input)
Which one depends more on your specific scenes and the available technology.
Sources
- Anthropic Computer Use API Docs — docs.anthropic.com/en/docs/age…
- Anthropic Best Practices for Computer and Browser Use — claude.com/blog/best-p…
- Open AI Company-Using Age publish-openai.com/index/compu...
- OpenAI Introducing GPT-5.4 — openai.com/index/intro…
- Open AI Ages SDK Interface - openai.github.io/openai-agen...
- Azure OpenAI Computer Use — learn.microsoft.com/en-us/azure…
- OpenAI Introducing Upgrades to Codex — openai.com/index/intro…
- OSWorld 2.0 Benchmark — arxiv.org/abs/2606.29…
Auto-fetched and translated by AI Atlas. All rights belong to the original author.