What CLS measures
Cumulative Layout Shift is a unitless Core Web Vital for unexpected visual movement. The score captures the largest burst of layout shifts during a page visit by combining the viewport area affected with the distance elements moved.
A good field target is 0.1 or less at the 75th percentile, segmented by mobile and desktop. That threshold describes user experience at a population level. It does not prove that one business-critical agent task is stable.
- Good: CLS at or below 0.1
- Needs improvement: above 0.1 and at or below 0.25
- Poor: above 0.25
The observation-to-action gap
An agent can inspect the DOM, accessibility tree or rendered pixels, choose a control and act a moment later. If an image, banner, font, recommendation or validation message moves that control between those moments, the stored target may now describe a different element or empty space.
Chrome lists CLS as an agentic browsing signal because element positioning can change between identification and interaction. The risk is highest for destructive, transactional or ambiguous neighboring controls such as confirm and cancel.
- The agent observes a named control and its current state
- Asynchronous content changes geometry or stacking
- The action lands on a stale target or the task must be retried
- The final state differs from the intended outcome
Measure the complete journey
A default Lighthouse load records only the initial synthetic page load. Real shifts also occur after scroll, route transitions, search results, consent decisions, authentication, validation and delayed personalization. Use a controlled user-flow trace and field data to cover the full lifecycle.
Record CLS beside task duration, retries and interventions. A shift that adds no task friction is still a performance finding. A small local shift that causes the wrong action is a task-critical finding even when the aggregate score remains below the field threshold.
- Session video with timestamps for observation, action and outcome
- Performance trace and layout-shift entries with affected nodes
- Before-and-after bounding boxes for the intended control
- DOM and accessibility snapshots around the unstable step
- Deterministic assertion of the resulting server or page state
Do not confuse excluded shifts with safe shifts
The metric normally excludes shifts within 500 milliseconds of a qualifying discrete input through the hadRecentInput flag. This avoids penalizing expected responses to a click, tap or keypress. Continuous interactions such as scroll are treated differently.
Metric exclusion does not guarantee agent safety. If a delayed response moves a target while an agent is planning its next action, the workflow can still fail. Keep both the standards-based CLS value and a task-level target-stability assertion.
Remove the common causes
Start with geometry that the browser can reserve before content arrives. Then inspect content injected above the current viewport, font swaps, responsive image selection and transitions that mutate layout properties.
- Set intrinsic width and height or aspect-ratio for images, video, ads and embeds
- Reserve stable space for consent, personalization, recommendations and validation
- Preload critical fonts and align fallback font metrics when swaps change line wrapping
- Insert new content outside the active task area or after an explicit user request
- Animate transform and opacity instead of top, left, width or height
- Test slow network, empty cache, localization and mobile breakpoints
Turn stability into a regression contract
Define a stability window for every critical step: from the agent's last observation until the action is acknowledged. Fail the task when the intended control changes identity, accessible name, visibility or position beyond the declared tolerance.
Keep the raw CLS score as a diagnostic metric and classify the business impact separately. This preserves compatibility with Core Web Vitals while making an agent-specific failure reproducible for engineering teams.
- Version the viewport, locale, cookie state, agent profile and network preset
- Capture both successful and failed repetitions
- Attribute the shift to the initiating resource or DOM mutation
- Retest the exact task after remediation, not only the landing page load
CLS audit questions for agent journeys
- Does field CLS meet 0.1 or less at p75 for mobile and desktop where enough data exists?
- Does a user-flow trace cover route changes, scroll, forms and delayed content?
- Are critical control bounds stable between observation and action?
- Do media, embeds and async modules reserve their final geometry?
- Can a shift be tied to its DOM mutation, resource and task timestamp?
- Does the final-state assertion catch wrong-target actions and duplicate retries?
Primary sources
- Cumulative Layout Shift (CLS)web.dev
- Optimize Cumulative Layout Shiftweb.dev
- Lighthouse agentic browsing scoringChrome for Developers
- Layout Instability APIWICG
