ReleaseCloudflare (Workers AI)Cloudflare (Workers AI)published Jun 26, 2026seen Jun 26

cloudflare/agents @cloudflare/codemode@0.4.2

cloudflare/agents

Open original ↗

Captured source

source ↗
published Jun 26, 2026seen Jun 26captured 4whttp 200method plain

@cloudflare/codemode@0.4.2

Repository: cloudflare/agents

Tag: @cloudflare/codemode@0.4.2

Published: 2026-06-26T12:19:49Z

Prerelease: no

Release notes:

Patch Changes

  • #1807 `7eea2fb` Thanks @mattzcarey! - Cleanup connector imports so connector modules are imported normally and the Vite plugin only auto-exports the CodemodeRuntime facet class. Codemode now fails loudly when the runtime facet class is not exported from the Worker entry.

DynamicWorkerExecutor.execute() run.

Each execution spins up a child Worker via loader.load() and obtains an RPC Fetcher stub via getEntrypoint(). These own native handles, and the code previously left them for the garbage collector. When such a handle is finalized late — for example during isolate shutdown under @cloudflare/vitest-pool-workers — workerd raises a fatal assertion ("tried to defer destruction during isolate shutdown") that kills the worker, surfacing as a flaky "Worker exited unexpectedly" with no failing assertion. The milder manifestation is workerd's "An RPC result was not disposed properly" warning.

The executor now disposes the entrypoint stub and the loaded worker in finally blocks (best-effort, via Symbol.dispose), releasing the handles while the isolate is still alive. No behavior or API change for callers.

  • #1793 `247ebeb` Thanks @mattzcarey! - Pass the outer MCP tool-call context to openApiMcpServer request callbacks so server-to-client requests and notifications can be associated with the originating response stream.
  • #1791 `9c85369` Thanks @mattzcarey! - Remove the root entry's runtime dependency on the optional ai and zod peers. Executor and runtime imports now bundle without either framework package installed.
  • #1806 `43f663d` Thanks @mattzcarey! - Increase the default DynamicWorkerExecutor timeout from 30 seconds to 60 seconds to better support longer-running codemode executions.

Notability

notability 3.0/10

Routine package version release.