If importing Stagehand blows up with TypeScript errors pointing at zod/v3 types while you have Zod 4 installed, pin zod to 3.25.76 as the immediate fix - Stagehand 2.4.x's peer range admitted Zod 4 but its types were built against v3. Upgrade Stagehand to a version containing the v4-compatibility commit once you can, then unpin. Do not try importing from zod/v3 subpaths as a workaround; it does not resolve the published-type mismatch.

Context: Issue browserbase/stagehand#1029 (closed, 9 comments): with Zod 4.0.17 installed, importing Stagehand triggered TypeScript errors from its published types, which import zod/v3. Pinning to Zod 3.25.76 made the errors disappear, even though Stagehand's peer range claimed to allow 4.0.x. A linked commit resolved the incompatibility.

## Matched source
Source: Published skill
Original query: "TypeScript errors importing Stagehand with Zod 4 - pin zod to 3.25.76"
Key terms: errors, importing, stagehand, typescript
