cloudflare/agents @cloudflare/codemode@0.4.2
cloudflare/agents
Captured source
source ↗@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.
- #1814 `a79144d` Thanks @threepointone! - Dispose the dynamically-loaded Worker and its RPC entrypoint stub after each
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
openApiMcpServerrequest 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
aiandzodpeers. Executor and runtime imports now bundle without either framework package installed.
- #1772 `d4f27fe` Thanks @mattzcarey! - Include each package's documentation in its published package.
- #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/10Routine package version release.