agent-interaction-timing

Reproducible live browser traces across Blink (Chrome 158.0.8127.38 / 158.0.8127.91), Gecko (Firefox 157.0), and WebKit (27.2) measuring automated DOM clicks, imperative and declarative WebMCP tool calls, ontoolactivated timing, and Long Animation Frame (LoAF) attribution.

24 ms → 248 ms
Median INP for CDP clicks on the same 20 ms button, first idle and then during a 260 ms WebMCP tool
0 / 110 + Prod
Zero delivered Event Timing entries across 110 local WebMCP trials AND live production craftquantities.com calls (get_my_project_summary: 472.1 ms, ontoolactivated -467.6 ms early)
15/15 vs 0/30
ToolExecuteCallback preserved across microtasks vs dropped across all 5 macrotask/scheduler boundaries (verified in Blink 158 C++ source + trace-only patch sketch)
4 / 4
Blinded 180 ms delay phases localized on Chrome 158.0.8127.91 (WindTunnel #42)

Cross-Engine Event Timing & LoAF Sweep (Dec 1, 2026)

Source: cross_browser_matrix.json and chrome158_empirical_report.json. All three engines exclude synthetic dispatchEvent('click') (isTrusted = false) and include automated browser clicks (isTrusted = true) in Event Timing, while only Chromium ships LoAF.

Browser Engine Synthetic dispatchEvent Automated Slow Click (210 ms) isTrusted supportsLoaf hasModelContext (default flags)

Chrome 158.0.8127.91 Matched Controls Benchmark

Run with --enable-features=WebMCPTesting --enable-blink-features=WebMCP,WebMCPTesting,DeclarativeWebMCP (npm run benchmark). Headless pointer controls use CDP Input.dispatchMouseEvent to send clicks. In Control C, page JavaScript calls document.modelContext.executeTool() and produces the same ToolExecuteCallback invoker.

Control Event Timing (interactionId > 0) LoAF Invoker Caller under the current actor model
A. Synthetic dispatchEvent('click') (210 ms) 0 entries BUTTON#btn-slow-promo.onclick unknown
B1a. Unmarked CDP click (55 ms) 64 ms Sub-blocking unknown (never assumed human)
B1b. Matched unmarked CDP click (210 ms) 216 ms Standard click handler unknown (unmarked click)
B2. Matched marked CDP click (210 ms) 208 ms Standard click handler automation (correlated harness turn)
C. Page-script imperative WebMCP executeTool (240 ms) 0 entries ToolExecuteCallback (241 ms frame, 191 ms blocking) unknown (imperative WebMCP path)
D. Declarative <form toolautosubmit> (195 ms) 0 entries FORM#promo-form.onsubmit (197 ms frame, agentInvoked = true on submit) unknown (declarative WebMCP path)

60-Trial Chrome 158.0.8127.91 ontoolactivated & Async LoAF Attribution Study

Source: ontoolactivated_timing_experiment.json (n = 20 per variant, Chrome 158.0.8127.91). Across all 60 runs, zero Event Timing entries were delivered (not even interactionId = 0), ontoolactivated fired 0.0 ms median (0.1 ms p95) after synchronous handler return, and crossing an async setTimeout dropped ToolExecuteCallback from LoAF completely.

Sync imperative (200 ms)
0/20 Event Timing
ToolExecuteCallback (200.2 ms LoAF)
200.1 ms
Async imperative (100+100 ms)
0/20 Event Timing
TimerHandler:setTimeout (100.2 ms)
-202.1 ms
Declarative form (195 ms)
0/20 Event Timing
FORM#decl-form.onsubmit (195.3 ms LoAF)
195.2 ms
Red line = document.modelContext.ontoolactivated timestamp Native WebMCP LoAF invoker Post-await LoAF invoker (WebMCP link lost)

Concurrent INP Tax (npm run repro:inp-tax)

Source: concurrent_inp_tax.json (five trials per scenario on Chrome 158.0.8127.91). The harness sends CDP clicks to a 20 ms button and measures INP with web-vitals/attribution. A local function reproduces the INP attribute mapping from OTel Browser 0.13.0 (@opentelemetry/browser-instrumentation). Median INP rose from 24 ms when idle to 248 ms during a 260 ms WebMCP tool. The mapped invoker identifies the script delaying the click.

Scenario (20 ms Fast Button) Median INP Median inputDelay Longest script invoker (reproduced OTel mapping) Rating
baseline_idle_click 24 ms 0.3 ms none good
click_during_sync_webmcp_260ms 248 ms 224.7 ms ToolExecuteCallback (execute) needs-improvement
click_during_async_webmcp_260ms 248 ms 225.2 ms TimerHandler:setTimeout ("") needs-improvement

12-Site Public WebMCP Census & Live CDP Correlator (repro:census, repro:cdp-correlate)

Sources: webmcp_live_census.json and cdp_webmcp_correlator.json (Chrome 158.0.8127.91 with CDP WebMCP domain + Tracing.start devtools.timeline). Across 12 live public WebMCP pages (10 registering active tools in Chrome 158), legacy navigator.modelContext detection missed 9/12 (9/10 working sites), while checking declarative forms + document.modelContext + optional chaining + window.toolManager matched 12/12. All 4 read-only live invocations across three independent stacks (craftquantities.com, webperf-snippets.net list_snippets 373.4 ms / -373.4 ms, and demo.openforagents.com get_site_info_api 807.9 ms / -799.6 ms) produced 0 Event Timing entries.

CDP WebMCP.invokeTool Case (120 ms) call → responded invoked → responded Event Timing devtools.timeline Invoker invocationId in Trace
imp_sync_120 (imperative sync) 124.06 ms 0.22 ms 0 ToolExecuteCallback (execute) false
decl_sync_120 (<form toolautosubmit>) 123.99 ms 0.09 ms 0 FORM#decl-form.onsubmit false
imp_settimeout_120 (async timer) 148.28 ms 147.41 ms 0 TimerHandler:setTimeout ("") false
imp_posttask_120 (scheduler.postTask) 149.02 ms 146.93 ms 0 SchedulerPostTaskCallback ("") false
imp_messagechannel_120 (MessageChannel) 122.39 ms 120.40 ms 0 MessagePort.onmessage ("") false
imp_raf_120 (requestAnimationFrame) 123.53 ms 122.50 ms 0 FrameRequestCallback ("") false

Live Production WebMCP Probe: craftquantities.com (npm run repro:prod)

Source: production_craftquantities_probe.json (read-only Chrome 158.0.8127.91 probe linked on webmcp#402). On concrete-calculator, window.load finished at 754.2 ms, Wave 1 registered 8 global tools at 881.4 ms, and Wave 2 registered all 19 page tools at 1,492.9 ms. Read-only calls reproduced the async ontoolactivated gap in production with zero Event Timing entries. On December 3, operator @Axelima independently replicated these measurements across 90 page kinds (270 cold loads, ~400 calls, 0 Event Timing entries) and shipped a live fix cutting post-resolve registration races from 36/42 to 1/42 and calculator-to-calculator navigation from 8 s failure (3/3) to ~0.2 s (reply).

Production Tool (readOnlyHint: true) Wall Time Event Timing ontoolactivated from Invoke Offset vs Resolve Double-rAF Paint Settle
get_citation (/developers/webmcp/) 116.1 ms 0 0.4 ms -115.7 ms 25.4 ms
get_my_project_summary (/developers/webmcp/) 472.1 ms 0 4.5 ms -467.6 ms 22.4 ms
get_calculator_method (concrete-calculator) 2.6 ms 0 1.9 ms -0.7 ms 26.7 ms
get_calculator_share_link (concrete-calculator) 1.1 ms 0 0.4 ms -0.7 ms 18.4 ms

10-Case Async Boundary & Concurrency Matrix (npm run repro:async, 50 Trials)

Source: async_boundary_experiment.json (n = 5 per case, 120 ms CPU workload on Chrome 158.0.8127.91). Microtasks stay inside the initial ToolExecuteCallback LoAF probe (15/15), while every macrotask and scheduler boundary drops ToolExecuteCallback (0/30). Overlapping unrelated timers do not inherit ToolExecuteCallback (0/5).

Async Boundary / Concurrency Case Delivered Event Timing ToolExecuteCallback Preserved Observed LoAF Invoker Median LoAF / Blocking

Chromium 158 vs 159 ModelContext LoAF Regression (npm run repro:loaf-159, 50 Trials)

Source: chromium159_loaf_regression.json (N = 5 per cell, 300 ms CPU under --enable-features=WebMCPTesting --enable-experimental-web-platform-features). Switching ModelContextHost and ModelContext to navigation-associated Mojo (c4c0950cf8, CL 8628070, still unfixed on Chromium main at 4f7a0a5aee7f, filed as Chromium issue 593642231) dispatches ModelContext::ExecuteScriptTool on proxy_task_runner_ with LocalFrame* == nullptr, dropping non-rendering LoAFs (0/5, while longtask still fires 5/5) and zeroing blockingDuration (0 ms in 5/5 runs) on DOM-updating LoAFs. DevTools CDP WebMCP.invokeTool still posts to TaskType::kInternalInspector and reports full ~250 ms blockingDuration.

Case (300 ms CPU, N = 5) Browser LongTask LoAF Median LoAF Median blockingDuration Median renderStart
executeTool() no DOM updateChrome 158.0.8127.915/55/5300.2 ms250.2 ms0
executeTool() no DOM updateChromium 159.0.8154.65/50/5nonenonenone
executeTool() + DOM updateChrome 158.0.8127.915/55/5300.6 ms250.5 ms664.4 ms
executeTool() + DOM updateChromium 159.0.8154.65/55/5300.6 ms0 ms (0/5 > 0)663.2 ms
CDP WebMCP.invokeTool no DOM updateChromium 159.0.8154.65/55/5300.2 ms250.1 ms0
CDP WebMCP.invokeTool + DOM updateChromium 159.0.8154.65/55/5300.8 ms250.7 ms661.4 ms
setTimeout control (no DOM update)Chromium 159.0.8154.65/55/5300.3 ms250.3 ms0

Chromium 159 waitForToolsUntil() Lifecycle Benchmark (npm run repro:wait-for-tools)

Source: wait_for_tools_until_benchmark.json (Chromium 159.0.8154.6 with --enable-features=WebMCP,WebMCPTesting,WebMCPWaitForToolsUntil, N = 5 trials). Unsettled holds trigger Blink's 10 s console warning at 10,005.37 ms (rejected holds settle cleanly with 0 warnings), confirming live activation. Yet during a 2-wave hydration hold, getTools() still leaked partial Wave 1 (2/5 tools) in 5/5 runs and CDP WebMCP.toolsAdded fired before settle (5/5). On a search_flights → list_flights SPA transition, ontoolactivated fired -92.2 ms median before resolve (0 Event Timing entries), and immediate list_flights after waitForToolsUntil() settled still returned 0 visible flights (5/5) across a 105.5 ms median (101.8–107.4 ms) post-settle DOM paint gap before returning all 12 rows (5/5).

3-Engine Event Timing #164 & Blocked-Pan #169 Matrix (npm run repro:event-timing-order)

Source: event_timing_order_and_pan.json (Chromium 159.0.8154.6, Firefox 157.0, WebKit 27.2, Dec 4, 2026). On held-key, Chromium and Firefox deliver keydown 'a' immediately with dispatch-ordered IDs, while WebKit holds it 412 ms until keyup and assigns IDs out of order. On held-pointer, both Chromium (485.4 ms) and Firefox (448 ms) head-of-line block completed 'k' behind pending pointerdown, while WebKit delivers 'k' immediately at 161 ms. On Chromium 159 touch pans (N = 5 each, 350 ms main-thread task), idle-pan stays at interactionId: 0 (5/5), whereas blocked-pan scrolls (5/5) yet emits nonzero interactionId (5/5) with 304 ms duration and 287.9 ms median processingEnd - startTime fallback (287.4–288.4 ms).

Event Timing #169 Scroll-Start Signals (npm run repro:scroll-start-169)

Source: scroll_start_signals_169.json (Chrome 158.0.8127.108 and Chromium 159.0.8154.6, N = 5 per cell, pointer-only and pointer plus passive touch listeners, Dec 5, 2026). A touch pan that starts during a 350 ms main-thread task dispatches pointerdown > pointerup with no pointercancel and no click (10/10 per browser, 20/20 total), while an idle pan fires pointercancel and a blocked tap fires click. window.scrollY read inside the pointerdown and pointerup listeners is 0, yet the first scroll event after the task already reports 394–400 px (vs 30 px idle). pointerdown.timeStamp matches the Event Timing startTime, and pointerup.timeStamp - pointerdown.timeStamp is 106.9–109.0 ms (vs 16.9–19.0 ms on a blocked tap), with both events sharing one nonzero interactionId and 288 ms pointerdown duration.

Long Animation Frames #52 navigationId Capture Timing (npm run repro:loaf-nav-id)

Source: loaf_navigation_id_52.json (Chrome 158.0.8127.108 and Chromium 159.0.8154.6, N = 5 per case per browser, 40 trials total, Dec 5, 2026). On a pre-navigation Frame 1 LoAF with an elementtiming hero painted before history.pushState() runs between paintTime and presentationTime, click Event Timing (10/10) and PerformanceElementTiming (10/10, using paint_timing.cc:375–377) keep nav0 on the exact same paintTime, while long-animation-frame and its click script jump to nav1 (10/10) because paint_timing.cc:529,636 drops navigation_id before calling WindowPerformance::QueueLongAnimationFrameTiming (window_performance.cc:1419 reads live NavigationId() at presentation flush). Same-frame soft-nav clicks also split click Event Timing (nav0) from their click-listener LoAF script (nav1, 10/10), mid-frame pushState() tags pre-navigation scripts with nav1 (10/10), and same-origin iframe descendant scripts inherit the parent LoAF nav1 instead of their child frame's navigationId (10/10).

Exact Trial Summaries (n = 20 per variant)

Variant Event Timing ontoolactivated from Invoke ontoolactivated vs Async Resolve Observed LoAF Invoker LoAF Dur / Blocking (Median)
executeTool_sync_200ms 0 / 20 200.1 ms (p95 200.3 ms) N/A (sync) ToolExecuteCallback 200.2 ms / 150.1 ms
executeTool_async_100ms_await_100ms_cpu 0 / 20 0.1 ms (p95 0.2 ms) -202.1 ms (resolve 202.2 ms) TimerHandler:setTimeout 100.2 ms / 50.2 ms
declarative_toolautosubmit_195ms 0 / 20 195.2 ms (p95 195.3 ms) N/A (sync, agentInvoked 20/20) FORM#decl-form.onsubmit 195.3 ms / 145.3 ms

4-Phase Blinded Planted-Delay Localization Probe (Chrome 158.0.8127.91)

Implemented in nekuda-ai/WindTunnel#42. A blind classifier receives only browser-observed Event Timing, LoAF invokers, and paint settle without knowing which phase held a 180 ms busy loop. The probe labeled the synchronous WebMCP callback as agent. All four callers are unknown under the current interaction-bound rule.

Planted 180 ms Delay Trial Event Timing Max LoAF LoAF Invoker Blind Phase Verdict Caller under the current model Localized

Privacy-Safe Coarse Actor Scope

Addresses w3c/charter-drafts#955 by omitting agentBrand, model, and extension IDs from browser timing entries.

{
  "actor": "human | agent | automation | unknown",
  "default": "unknown",
  "agentBrand": "omitted (no fingerprinting)",
  "model": "omitted (no fingerprinting)",
  "otel_alignment": "opentelemetry-browser#486 (INP attribution)"
}

Active Upstream Work & Receipts

Reproduce Locally

The local Chrome 158 harness serves the wpt/ files over loopback HTTP with testharness and testdriver shims. consequential-consent-isolation checks a client-side SHA-256 helper that fingerprints tool registrations independently of any browser consent decision. The upstream WebMCP suite covers declarative agentInvoked, the toolactivated lifecycle, and NotFoundError for stale tool handles over HTTPS. The upstream PR for w3c/event-timing#171 is web-platform-tests/wpt#63735.

git clone https://github.com/adityareddy-dev/agent-interaction-timing.git
cd agent-interaction-timing
npm install
npm test                    # Unit tests (4-value actor model + OTel #486 draft)
npm run test:wpt            # Runs 3 local Chrome 158 harness files (7 subtests)
npm run repro               # 60-trial ontoolactivated and async LoAF experiment
npm run repro:async         # 10-case (50-trial) async-boundary and concurrency LoAF matrix
npm run repro:inp-tax       # CDP click INP (24 ms -> 248 ms, reproduced OTel 0.13.0 mapping)
npm run repro:prod          # Read-only production craftquantities.com WebMCP timing probe
npm run repro:census        # 12-site live public WebMCP census on Chrome 158
npm run repro:cdp-correlate # Real CDP WebMCP.invokeTool + devtools.timeline correlator
npm run repro:loaf-159      # 50-trial Chrome 158 vs Chromium 159 ModelContext LoAF regression check
npm run repro:wait-for-tools # Chromium 159 waitForToolsUntil() hydration, SPA paint-gap, and 10 s warning benchmark
npm run repro:event-timing-order # 3-engine Event Timing #164 reporting-order and Chromium 159 #169 blocked-pan benchmark
npm run repro:scroll-start-169   # #169 scroll-start signals on Chrome 158 and Chromium 159
npm run repro:loaf-nav-id        # #52 LoAF navigationId capture timing on Chrome 158 and Chromium 159
npm run repro:browsers      # Chrome 158, Firefox 157, and WebKit 27.2 sweep
npm run benchmark           # Matched Chrome 158 controls benchmark