0.8.52AUGUST 2026

ISOLATE · OWN · CLEAN

Keep the handle.
Lose the runtime.

Effect-exclusive mutable refs become ordinary setup-invocation closures. SDK handles, WebSockets, generation tokens, and animation frames keep familiar React-shaped source while Kudzu retains exact ownership.

1Owning effect
0Serialized ref captures
0 BStatic sibling JavaScript
P1

EFFECT-PRIVATE OWNERSHIP

Move mutable values inward.
Keep lifecycle boundaries exact.

SOURCE

Keep ordinary refs

Author top-level useRef(null) and useRef(0) values with direct .current access.

LOWERING

Create per invocation

The compiler moves exclusive refs into the inline setup closure and removes component captures.

REPLACEMENT

Clean before restart

Dependency changes invalidate and clean the old closure before creating a distinct replacement.

BFCache

Retain when persisted

Mount effects preserve their closure across persisted pagehide and resume through authored listeners.

EVIDENCE

Exercise real handles

E2B terminal and WebSocket fixtures verify generation, listeners, stale callbacks, and exact close behavior.

BOUNDARY

Fail closed

Cross-effect/event refs, aliases, escaped objects, nonzero initializers, and missing cleanup invalidation remain diagnosed.

UPGRADE

Let each effect own its browser resource completely.

$npm install @kudzujs/core@^0.8.52