v4 shipped with server-side caching **opt-in**, where v3 had it on by
default. Anyone who upgraded without passing `cache` lost caching
without an error.
## Change
Both defaults flip to `true`, so v4 matches v3: caching runs unless the
instance or the call opts out.
## Docs
`v4/best-practices/caching.mdx` described opt-in, which this makes
wrong.
The v3 migration guide also mapped `enableCaching` → `cache`.
`enableCaching` was a **v2-era local** option that v3 had already
replaced with `cacheDir`; the server-side option v3 users actually had
was `serverCache`, which appeared nowhere in the v4 docs. Corrected the
mapping and the diff example.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Fixes AP-2925 by restoring v3's caching default in v4: caching was
opt-in and is now enabled unless the instance or call opts out. This
prevents upgrades from silently losing caching; the server's project
feature flag still controls availability.
- Adds tests for the omitted default, explicit opt-out, and default
cache lookup, and regenerates the embedded Go extension archive to match
the merged extension source after resolving a conflict with main.
- Corrects the migration guide to map `serverCache` to `cache` and
remove outdated `enableCaching`/`cacheDir` mappings; updates caching
docs for locator-scoped bypasses, `DISABLED` status, the `stagehand.act`
opt-out example, and `create()` examples that show the default doing the
work.
- Updates credential-safety guidance in act, prompting, and the Browser
Use migration to warn that variable values reach the cache service by
default, recommending `cache: false` on calls carrying credentials.
<sup>Written for commit a4ee44f2c3dca45d86c4cb248f6e7afb71d3f097.
Summary will update on new commits.</sup>
<a
href="https://cubic.dev/pr/browserbase/stagehand/pull/2964?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>