@cloudflare/codemode@0.3.6

cloudflare/agents@cloudflare/codemode@0.3.6May 14, 2026by github-actions[bot]

AI Summary

This patch release (@cloudflare/codemode@0.3.6) fixes binary data handling in codemode and removes redundant code echoing from tool results. The changes ensure Uint8Array values properly survive the sandbox boundary while cleaning up the tool response format.

Key Highlights

  • Uint8Array/binary values now preserved across codemode sandbox boundary
  • Fixed state.writeFileBytes() working with byte arrays in codemode
  • readFileBytes() results now correctly return as Uint8Array values
  • Removed echoed source code field from successful codemode tool results

Breaking Changes

  • The `code` field is no longer returned in codemode tool results - only `result` and `logs` are now returned

Full Release Notes

### Patch Changes

-   [#1521](https://github.com/cloudflare/agents/pull/1521) [`2911bae`](https://github.com/cloudflare/agents/commit/2911bae6c7a0e331de9cb8471ab877aee2a385d2) Thanks [@mattzcarey](https://github.com/mattzcarey)! - Preserve binary values across codemode tool calls so `Uint8Array` arguments and results survive the sandbox boundary. This fixes `state.writeFileBytes()` from codemode with byte arrays and keeps `readFileBytes()` results as `Uint8Array` values.

-   [#1523](https://github.com/cloudflare/agents/pull/1523) [`5f1376f`](https://github.com/cloudflare/agents/commit/5f1376fed1b9ff47dda4b98c5369a4e060ce796d) Thanks [@mattzcarey](https://github.com/mattzcarey)! - Remove the echoed source `code` field from codemode tool results. Successful sandbox executions now return only the execution `result` and any captured `logs`.