Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Stagehand caching refers to two different mechanisms: Browserbase’s server-side cache for certain Stagehand operations, and agent action replay caching. They have different purposes and controls. The server-side cache described in the Stagehand v3 reference works only with env: "BROWSERBASE"; it has no effect on local runs. Browserbase’s August 21, 2026 changelog describes a v4 cache with configurable hit thresholds and result metadata. Before changing a setting or diagnosing a miss, identify which version, environment, and cache type your workflow uses.

Stagehand has two different kinds of caching

“Stagehand cache” is not one universal store. The documented server-side cache reuses results from selected operations; agent action replay caching concerns recording and replaying an agent’s actions. A cache setting for one mechanism should not be assumed to control the other.

Mechanism What it is for What the available documentation establishes
Server-side inference/result cache Reusing results from act(), extract(), and observe(). The v3 API reference documents serverCache for Browserbase runs. Browserbase’s v4 changelog describes configurable thresholds, per-call controls, and cache metadata.
Agent action replay cache Recording and replaying an agent workflow. A GitHub issue reports custom-tool steps missing from recording and replay in the reported case. That is separate from the server-side cache.

These descriptions come from different version contexts. Do not copy v4’s cache threshold setting into a v3 configuration, or treat the v3 serverCache option as a description of agent replay.

What the v3 server cache does

The Stagehand v3 API reference documents server caching for act(), extract(), and observe(). Its serverCache setting is enabled by default and can be overridden for an individual operation. The reference explicitly limits this behavior to env: "BROWSERBASE"; local runs are unaffected. The Stagehand v3 Stagehand class reference is the appropriate source for this setting.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The Stagehand changelog says repeated calls with the same inputs can return without consuming LLM tokens, and says caching can be disabled with serverCache: false at the instance level or for an individual call. That is a statement about the documented mechanism, not a promise that every repeated operation will hit. The Stagehand changelog provides the related release context.

How to turn v3 caching off

  • For all operations on the configured instance, set serverCache: false.
  • To bypass it for one operation, use that operation’s documented per-call override.
  • Keep the setting aligned with the environment: changing serverCache does not make the server-side cache apply to local runs.

The cited reference establishes instance and per-operation control for the three named methods. It does not provide grounds here to assume that this setting changes unrelated browser, HTTP, or agent replay caches.

What Browserbase’s v4 cache adds

In its August 21, 2026 changelog entry, Browserbase describes a v4 cache with a configurable hit-count threshold. The threshold determines how many identical results must be observed before the cache begins serving a result. Its example uses threshold 2; it also describes threshold 1 on a step, where the second call is a hit. These are configuration examples, not benchmarks or a guarantee of a particular speedup. See “Configurable caching in Stagehand”.

Rank #2
Sale
HTML and CSS: Design and Build Websites
  • HTML CSS Design and Build Web Sites
  • Comes with secure packaging
  • It can be a gift option

Instance and call-level controls

The changelog describes setting cache: { threshold: n } on an instance or overriding it for a call. A call can also use cache: false to disable caching for that call. Use the syntax documented for the v4 interface you have installed; do not substitute it for v3’s serverCache option.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Read the result metadata

The v4 description says results expose cache metadata including a status of HIT, MISS, or DISABLED, a miss reason, and tokens saved. Inspect the metadata on the operation result instead of inferring cache behavior from a repeated prompt or from elapsed time alone. The changelog also states: “Model configuration stays out of the cache key, so switching models does not invalidate your cache.” It does not, however, enumerate every cache-key input or specify a complete expiration and invalidation policy.

Does Stagehand caching work in local environments?

For the v3 server-side cache documented in the API reference, no: the reference says it applies only to Browserbase and has no effect in local environments. A local run may still perform the same Stagehand operation, but you should not expect that particular hosted cache behavior there. This qualification is specific to the documented v3 server cache; it should not be generalized to every possible cache in an application.

The v4 changelog describes Browserbase’s configurable cache. When diagnosing a v4 setup, confirm that the workflow is using the Browserbase context described by that feature and that you are inspecting the result metadata for the operation. The cited changelog does not establish that the feature applies to local execution.

Why is Stagehand cache status always MISS?

First establish which cache you mean. A server-cache MISS is not the same as an agent replay that does not include an action. Then check the configuration and the operation result in this order:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Identify the version and cache vocabulary. The v3 reference uses serverCache; Browserbase’s v4 changelog uses cache with a threshold and metadata. Verify the documentation for the version actually running.
  2. Verify the deployment environment. For the documented v3 behavior, a local environment is not eligible for the Browserbase server cache. Confirm that the operation is running with env: "BROWSERBASE" if you expect that cache.
  3. Check the effective setting. An instance-level setting may be overridden at the call level. In v3, check serverCache; in v4, check the instance threshold and any per-call cache override, including cache: false.
  4. Inspect the returned metadata. For v4, distinguish DISABLED from MISS, and read the reported miss reason. The changelog does not establish every cache-key component, so do not presume that two operations are identical simply because their visible prompts look alike.
  5. Separate replay from inference caching. If the concern is that an agent skipped or failed to repeat a step, investigate the agent replay record and custom-tool behavior rather than treating it as a server-cache miss.

A Stagehand 3.1.0 user reported recurring misses for act(), extract(), and observe() on Browserbase while using serverCache: true. The issue is marked closed, but its page does not establish what fixed the behavior or which release contains a fix. Treat it as a historical report, not proof of a defect in every current version; compare it with the metadata and effective configuration for your own run. See Stagehand issue #1767.

Rank #4
Sale
Web Design with HTML, CSS, JavaScript and jQuery Set
  • Brand: Wiley
  • Set of 2 Volumes
  • A handy two-book set that uniquely combines related technologies Highly visual format and accessible language makes these books highly effective learning tools Perfect for beginning web designers and front-end developers

Why might an agent replay skip a custom tool?

Agent action replay is a separate feature from caching a server-side result. In Stagehand issue #1558, a user reported that custom-tool calls were not recorded or replayed, with the consequence that essential actions could be skipped on replay. The issue is marked open. This identifies a reported case; it does not establish that all Stagehand releases or all custom tools behave this way.

If a replay omits a step, compare the original run with the replay record and check whether the missing action came from a custom tool. Until you have verified that the tool’s action is included and replayed in your version, do not rely on a replay as the sole evidence that a consequential custom action ran. The issue does not establish a universal workaround or a release in which the behavior is fixed.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What caching means for cost, latency, and reliability

Token use

The Stagehand changelog says matching repeated calls can return without consuming LLM tokens, and Browserbase’s v4 changelog exposes saved-token metadata. Whether an individual call qualifies depends on the applicable cache behavior and its effective settings; use the reported metadata rather than estimating savings from call counts.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Latency and throughput

The cited material supplies no independently published performance benchmark. A cache hit may avoid repeating work, but the threshold examples are not evidence of a specific latency reduction, request capacity, or percentage saved. Measure your own workload if those values affect a production decision.

Freshness and invalidation

The v4 changelog specifically excludes model configuration from the cache key, so changing models alone does not invalidate the cache described there. The available description does not establish every other key input, expiration policy, or invalidation rule. If an operation must reflect newly changed page state, do not assume that a prior result will be invalidated for a particular change unless the documentation for your version says so; use the per-call disable control where appropriate and verify the returned result.

Failure handling

A cache hit is not a substitute for checking that an operation’s output is correct for the current task. For v4, retain or log the returned cache status and miss reason with the operation result when debugging. For v3, confirm the environment and effective override, since local execution is outside the documented server-cache path. For an omitted agent step, inspect replay behavior independently.

Or skip the browser setup

If your task is simply to capture a website screenshot rather than build a Stagehand automation or diagnose its cache, ScreenshotNeo offers a separate screenshot API. One GET request returns a screenshot or PDF. The following cURL command saves a WebP capture of Stripe; replace the target URL as needed. See the ScreenshotNeo API documentation for API details.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
  • Cookie and consent banners are accepted as a visitor, and 60+ known consent platforms, newsletter popups, and chat widgets are removed before capture; each step can be turned off.
  • Bot checks, CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing; responses include X-Page-Verdict and X-Billed headers.
  • An MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and any MCP client.
  • The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots.

ScreenshotNeo is a screenshot service, not a replacement for Stagehand’s server-side cache or agent action replay. Visit ScreenshotNeo for the service, or sign up free to get 1,000 screenshots a month with no card.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.