Architecture: How to optimize Computer Use session speed? Current: ~3-4 mi...

Documentation for Sessions

🏗️ Architecture: How to optimize Computer Use session speed? Current: ~3-4 mi...

Date: 2026-02-24
Time: 18:54:58 UTC
Session: gspace1-139.3
Agent: angular
Confidence: 92%
Status: ✅ Documented


📋 Decision Context

Question:

How to optimize Computer Use session speed? Current: ~3-4 min for 23-step Gmail task.

Task: Optimize Computer Use session speed


🎯 Decision Made

Chosen:

Multi-pronged optimization: (1) Reduce SETTLE_DELAY 1000ms→500ms, (2) Skip redundant post-action screenshots for wait/key actions, (3) Add frontend SSE streaming for real-time step updates instead of 5s polling, (4) Pre-launch Chrome in sandbox during creation wait, (5) Compress screenshots before sending to Anthropic API

Options Considered:

  1. Reduce settle delay only
  2. Skip screenshots for non-visual actions
  3. Add SSE streaming
  4. Pre-warm sandbox pool (complex, deferred)
  5. All of the above minus pool

💭 Reasoning

Profiling the 23-step Gmail task reveals: ~23 × 1s settle delay = 23s wasted. ~23 × 1.5s screenshot capture = 34.5s. ~23 × 3s Anthropic API = 69s. Total ~126s overhead on a 3-4 min task. The settle delay (1s between actions) was conservative — modern browsers respond in <200ms. Reducing to 500ms saves 11.5s. Skipping screenshots after non-visual actions (wait, key press for Enter) saves ~5-8s. Pre-launching Chrome during sandbox creation (parallel, not sequential) saves ~3s. The biggest win would be streaming — currently UI polls every 5s, so users see stale data. SSE would show steps in real-time. Screenshot compression (resize to 1280x800 before base64) reduces Anthropic API payload, potentially saving 0.5-1s per round-trip. Combined expected improvement: ~30-40% faster (3-4 min → ~2 min).


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation