Concurrent/Parallel Execution Patterns · 100-Site Benchmark · 2026-06-05
Token isolation pattern using separate bash invocations:
# Bash A: Token baseline
jq '.messages[-1].id' ~/.claude/projects/*/*.jsonl | tail -1 > snapshot.txt
# Bash B: Run measurement
python3 measure_sites.py
# Bash C: Calculate token delta
jq '.messages[-1].id' ~/.claude/projects/*/*.jsonl | tail -1 > final.txt
diff=$(( $(cat final.txt) - $(cat snapshot.txt) ))
Advantages:
Full architectural validation through real-world execution:
| Phase | Method | Duration | Sites | Result |
|---|---|---|---|---|
| CLI | Vibium Python API + ThreadPoolExecutor | 26.2s | 7 | ✅ Parallel (6.3× faster) |
| MCP | Vibium MCP tool calls (sequential) | 164.4s | 7 | ✅ Sequential (confirmed) |
| Total | Hybrid approach | 190.6s | All 7 | ✅ Both measured |
Speed Analysis:
from vibium import browser as vibium_browser
from concurrent.futures import ThreadPoolExecutor
browser = vibium_browser.start(headless=True)
contexts = [browser.new_context() for _ in range(N)]
pages = [ctx.new_page() for ctx in contexts]
with ThreadPoolExecutor(max_workers=2) as pool:
futures = {
pool.submit(measure_site, site, page): site
for site, page in zip(sites, pages)
}
Why it works:
Benefit: ~4–6× speedup for concurrent operations
All tools operate on a single active page; cannot execute in parallel:
browser_start {}
→ browser_new_page {url: site1}
→ browser_wait_for_load {}
→ browser_map {}
→ browser_new_page {url: site2} ← Must wait for site1
→ browser_wait_for_load {}
→ browser_map {}
Why it fails:
Constraint: Fundamental to MCP's design; cannot be fixed without protocol redesign
Each SKILL invocation is isolated:
for site in site1 site2 ...; do
/practice-testing $site --cli &
done
wait
Why it works:
Benefit: Parallelizable at agent level without architectural constraints
| Metric | CLI | MCP | Ratio |
|---|---|---|---|
| Total Time | 17.6m | 68.9m | 3.9× |
| Total Cost | $1.82 | $7.96 | 4.4× |
| Total Turns | 164 | 1,146 | 7.0× |
| Avg/Site Time | 10.6s | 41.4s | 3.9× |
| Avg/Site Cost | $0.0182 | $0.0796 | 4.4× |
| Avg/Site Turns | 1.6 | 11.5 | 7.0× |
Key Insight: MCP requires ~7× more LLM interactions (turns) for the same operations. Cost and timing track closely with turn count.
From Playwright documentation:
CLI: Modern coding agents increasingly favor CLI–based workflows exposed as SKILLs over MCP because CLI invocations are more token-efficient and allow agents to parallelize work. This makes CLI + SKILLs better suited for high-throughput agents.
MCP: MCP remains relevant for specialized agentic loops that benefit from persistent state, rich introspection, and iterative reasoning over page structure, such as exploratory automation, self-healing tests, or long-running autonomous workflows.
Implication: For measurement and automation at scale → Use CLI + SKILLS. For exploration and debugging → Use MCP.
Use: Parallel CLI (Vibium Python API)
Benefits:
Use: Sequential MCP (Vibium MCP tools)
Benefits:
Tradeoff: Accept 6.3× slower execution for rich context
Use: CLI + SKILLS (distributed across agent threads)
Benefits:
Finding: Token metrics are stable and reliable across measurement sessions.
Evidence:
Confidence: ✅ High — validated across 100 sites with consistent results
Explore all 100 sites with sortable tables, category breakdowns, and detailed performance charts:
Document Date: 2026-06-05
Measurement Scope: 100 sites (General Practice, Automation Testing, API Testing, Security Testing, Performance Testing)
Protocol: Three-bash bracket with token isolation v2
Status: ✅ Complete — Findings validated through hybrid measurement and architectural analysis