What Claude Haiku 4.5 gets wrong about zod — battery v1, tested 2026-08-28

Run zod--claude-haiku-4-5--v1--2026-08-28

Summary

The only subject whose Zod knowledge predates the v4 line entirely. Four findings including an S1 that will not compile, plus a fabricated release history. Battery v1 discriminates strongly here, which is exactly why it is retained for smaller and older models even though it is saturated for frontier subjects.

SubjectClaude Haiku 4.5 claude-haiku-4-5-20251001, Anthropic
Invoked asAgent tool, model alias "haiku"
Cutoff the model statesnot stated
Newest zod release it could place3.x (release date not established in this run)
Oldest zod release it could not place4.0.0 · 2025-07-10 (the lower end of the bracket is not established in this run, so it bounds the boundary from above only)
In its own wordsclaims v3 released Sept 2024 — also false; v3 shipped 2021
Library at test timezod 4.5 (npm), verified 2026-08-28
Batteryzod/v1 · 6 tasks, 3 direct questions
Tool uses during test0 (a run with any tool use is void — we measure training knowledge, not retrieval)
Tested2026-08-28
Findings5, of which 5 chargeable

Findings

F1 · single-argument z.record()

S1breaks-build · z.record() · removed · changed in zod 4.0.0 (2025-07-10) · chargeable

What the model believes

Wrote z.record(z.number()) for string-to-number records, i.e. that the single-argument form is current.

What it wrote
z.record(z.number())
What works on zod 4.5
z.record(z.string(), z.number())
Impact

Generated code fails type-checking on zod@4. Hard build break.

Verified against

F2 · method-style string format validators

S3deprecated · z.string().uuid() / .email() / .url() · deprecated · changed in zod 4.0.0 (2025-07-10) · chargeable

What the model believes

Wrote z.string().uuid(), z.string().email(...), z.string().url() and asserted ".email() method is the current recommended way to validate email."

What it wrote
z.string().uuid()
z.string().email()
z.string().url()
What works on zod 4.5
z.uuid()
z.email()
z.url()
Impact

Deprecated surface, and the "current recommended way" claim is false for current Zod.

Verified against

F3 · message-style custom errors

S3deprecated · message / invalid_type_error / required_error · deprecated · changed in zod 4.0.0 (2025-07-10) · chargeable

What the model believes

Wrote z.string().email('Please enter a valid email') and { message: ... } as the way to customise errors.

What it wrote
z.string().email('Please enter a valid email')
What works on zod 4.5
z.email({ error: 'Please enter a valid email' })
Impact

Zod 4 unifies error customization under the error param; message is deprecated and invalid_type_error / required_error were dropped entirely.

Verified against

F4 · .flatten() for form errors

S3deprecated · ZodError.flatten() / .format() · deprecated · changed in zod 4.0.0 (2025-07-10) · chargeable

What the model believes

Wrote result.error.flatten() to obtain fieldErrors / formErrors for a form UI.

What it wrote
result.error.flatten()
What works on zod 4.5
z.treeifyError(result.error)
Impact

Deprecated in Zod 4 alongside .format().

Verified against

F5 · asserts Zod 3 is the latest major and invents a changelog to support it

S4wrong-metadata · version-fact · changed in zod 4.0.0 (2025-07-10) · chargeable

What the model believes

Asserted Zod 3 is the latest major, "released September 2024," and described a fictional v2-to-v3 changelog. Zod 3 in fact shipped in 2021.

Impact

A user asking this model "should I upgrade?" gets confidently wrong advice, with fabricated supporting detail and no hedge.

Scope note

Recorded as the contrast case for calibration: every other subject hedged its version claim. This one did not.

Verified against

What it got right, and near misses

Recorded so the run cannot be read as a hit list. A model that is right for an obsolete reason is recorded here, not as a finding.

KindAPINote
correct safeParse discrimination, z.infer, .partial(), .pick({...}), basic z.coerce.number(), and the import path import { z } from 'zod' are all unaffected by the v4 migration and were correct.

Open questions from this run

Sources

Battery specification: prompts/zod.md in the studio repo. Every finding above also carries its own citation.