{"slug": "effect-v4-beta-july-2026-updates", "title": "Effect v4 Beta: July 2026 Updates", "summary": "Effect v4 beta's July 2026 updates moved development to the canonical Effect-TS/effect repository, added native Deno support, a new Graph module, and overhauled Schedule and Cron APIs. The beta also introduced Schema.Decoder and Schema.Encoder types, and hardened security and HTTP APIs.", "body_md": "-\n[What landed in July](#what-landed-in-july) -\n[Native Deno Support](#native-deno-support) -\n[Graph Module](#graph-module) -\n[Cron](#cron) -\n[Schedule](#schedule) -\n[Schema](#schema) -\n[HttpApi Hardening](#httpapi-hardening) -\n[Security hardening](#security-hardening) -\n[Migration Tooling](#migration-tooling) -\n[Fiber Runtime](#fiber-runtime) -\n[Durable Execution & Workflow](#durable-execution--workflow) -\n[SQL](#sql) -\n[Native SQLite in Node](#native-sqlite-in-node) -\n[RPC & HTTP](#rpc--http) -\n[Atoms & Reactivity](#atoms--reactivity) -\n[OpenTelemetry](#opentelemetry) -\n[AI](#ai) -\n[LayerRef](#layerref) -\n[FileSystem](#filesystem) -\n[CLI](#cli) -\n[New Core APIs](#new-core-apis) -\n[MutableList](#mutablelist) -\n[Config & URL](#config--url) -\n[String Utilities](#string-utilities) -\n[Entity & Cluster](#entity--cluster) -\n[Performance](#performance) -\n[Bun](#bun) -\n[Documentation](#documentation) -\n[Keep up with the Effect v4 beta](#keep-up-with-the-effect-v4-beta)\n\nWelcome to another month of Effect v4 beta. The biggest structural change of the month, and arguably of the entire beta, happened in the final week, when Effect v4 moved to the canonical `Effect-TS/effect`\n\nrepository.\n\nThe `main`\n\nbranch is now v4, while v3 lives on the `v3`\n\nbranch. The `effect-smol`\n\nrepo is archived and read-only, with all history preserved for reference. For anyone following the beta via the `effect-smol`\n\nrepository, the new home for development is [ Effect-TS/effect](https://github.com/Effect-TS/effect).\n\n## What landed in July\n\n### Native Deno Support\n\nAdded a full Deno platform integration in `@effect/platform-deno`\n\n, including an HTTP platform, HTTP server, socket support, socket server, cluster HTTP and socket support, multipart support, and a Deno services aggregate module.\n\nEffect now has first-class support for Deno alongside Node.js, Bun, and the browser.\n\n### Graph Module\n\nA new `Graph`\n\nmodule landed with a broad initial feature set: graph set operators (`union`\n\n, `intersection`\n\n, `difference`\n\n), opaque `Graph`\n\ninterfaces for better encapsulation, `toGraphViz`\n\nDOT output, `floydWarshall`\n\nshortest paths, `isAcyclic`\n\nand `isGraph`\n\npredicates, a `Walker`\n\niterator, and fixes for edge transforms, mutation finalization, and parallel undirected edge handling. Graph set operation gotchas are also documented.\n\n### Cron\n\nA thorough hardening pass landed for the `Cron`\n\nmodule:\n\n- validated\n`Cron.make`\n\nfield restrictions - fixed\n`Cron.prev`\n\nmonth day rollover and weekday wrapping - fixed alias normalization, added day and weekday intersection semantics in the inspection representation, and\n- corrected JSDoc examples and documentation accuracy.\n\n### Schedule\n\nThe `Schedule`\n\nAPI received its most significant overhaul of the beta. Limiting APIs were consolidated into a cleaner surface. `Schedule.min`\n\nand `Schedule.max`\n\nwere added for composing schedules by output. The internal representation was simplified, and several redundant APIs were removed.\n\nCron semantics also improved: `Schedule.cron`\n\nnow more closely adheres to vixie semantics, including support for step fields like `5/15`\n\nexpanding from the starting value through the field maximum. A bug where `Schedule.cron`\n\nmisbehaved when the test clock was adjusted to infinity was also fixed.\n\n### Schema\n\nSchema work continued steadily across the month.\n\n**New types** - added `Schema.Decoder`\n\nand `Schema.Encoder`\n\ntypes for passing simpler schema shapes to APIs that only decode or only encode. Added `Schema.DateFromMillis`\n\nfor millisecond-epoch date decoding. Added discriminants to `Schema.toTaggedUnion`\n\nfor more precise tagged union encoding.\n\n**Correctness fixes** - fixed excess property handling in schema-backed class constructors. Fixed `StructuralProto`\n\nequality. Preserved content schema identifiers when emitting JSON Schema for `Schema.fromJsonString`\n\n. Fixed JSON Schema tuple `allOf`\n\nintersections. Fixed tuple post-rest element indexing. Fixed union candidate dispatch ordering. Prevented prototype pollution in bracket-path decoding. Preserved nested class construction when applying constructor defaults.\n\n**DX** - simplified the displayed `Type`\n\n, `Encoded`\n\n, and `Iso`\n\ntypes of required readonly `Schema.Struct`\n\nfields for cleaner hover types in editors. Improved the `passthrough strict: false`\n\nmode example in docs.\n\n### HttpApi Hardening\n\nThe HttpApi layer received a significant hardening pass in the final week of July.\n\nHighlights include:\n\n- reused response schemas\n- normalized payload media types\n- hardened HTML rendering in API docs\n- fixed client error and authorization decoding\n- improved type-level performance\n- kept\n`HttpApi`\n\ncomposition immutable - applied\n`transformClient`\n\nwhen building individual endpoint clients - rejected duplicate and unknown handler registrations with descriptive errors\n- rejected duplicate OpenAPI operations and incompatible security scheme names\n- compiled SSE client decoders once instead of per-request, preserved\n`__proto__`\n\nidentifiers, and - added\n`HttpApiError`\n\nfor status 422.\n\nEarlier in the month: ensured handler errors don’t cause `HttpApi`\n\nsecurity middleware to fall back to unauthenticated behavior, and fixed `HttpApi`\n\nto return `400`\n\nfor malformed JSON request bodies.\n\nAdditional HTTP fixes:\n\n- fixed\n`HttpRouter`\n\nmiddleware context inference - routed multipart errors to HTTP responses\n- fixed published pre-response handler types\n- handled aborted HEAD responses during\n`NodeHttpServer`\n\ndisposal, and - fixed the OpenAPI generator’s handling of recursive schema forward references.\n\n### Security hardening\n\nA broad security hardening sweep landed in the final week:\n\n- stripped credentials on cross-origin HTTP redirects\n- hardened cookie attribute validation\n- secured MSSQL transport defaults\n- hardened file-backed key-value store keys\n- hardened JSON-RPC message classification, and\n- escaped control characters in CLI error messages.\n\n### Migration Tooling\n\nAdded API diff tooling for v3-to-v4 migration, making it easier to identify breaking changes when upgrading from Effect v3.\n\n### Fiber Runtime\n\nA thorough round of fiber runtime hardening landed:\n\n- fixed pending interrupt delivery across\n`interruptibleMask`\n\n- prevented concurrent traversal daemon leaks\n- fixed\n`FiberHandle.clear`\n\nrace - cleaned up\n`Fiber.joinAll`\n\nobservers on interruption - preserved stack annotations for terminal root failures\n- stored interruptor stack frames separately\n- avoided\n`runSyncExit`\n\ndispatcher allocation - made\n`awaitAllChildren`\n\nchild selection linear - fixed handling of large millisecond values passed to\n`sleep`\n\n- fixed fiber self-interruption from inside a running observer\n- fixed cache lookup to only interrupt when all awaiters are gone.\n\n### Durable Execution & Workflow\n\n- Fixed durable race result replay.\n- Ensured\n`PersistedQueue`\n\ndecoding failures count as processing attempts. - Fixed Redis-backed\n`PersistedQueue`\n\nscript handling. - Fixed SQL-backed persisted queues to refresh locks for actively acquired elements.\n- Fixed a missing\n`requiresHandler`\n\nflag on a durable activity type. - Fixed the activity retry policy.\n\n### SQL\n\n- Added\n`SQL.valuesUnprepared`\n\nfor raw value interpolation. - Fixed\n`sqlite-do`\n\nDurable Object transactions. - Fixed\n`sqlite-bun`\n\nto fail with a typed`SqlError`\n\nwhen statement preparation throws. - Scoped unknown request tag failures to the request instead of the connection.\n- Fixed SQL-backed persisted queues.\n- Added\n`disablePreparedStatements`\n\noption to`@effect/sql-mysql2`\n\n. - Avoided creating a table when it’s not needed.\n\n### Native SQLite in Node\n\nReplaced `better-sqlite3`\n\nwith Node’s built-in `node:sqlite`\n\nmodule in `sql-sqlite-node`\n\n, removing a native dependency and improving portability across Node environments.\n\n### RPC & HTTP\n\n- Failed\n`RpcClient`\n\nHTTP requests with a defect when the response closes early. - Fixed the bundle resolver for package export subpaths.\n- Matched\n`NodeHttpServer.layerConfig`\n\nservices. - Changed RPC IDs to\n`string | number`\n\nfor broader compatibility with existing systems. - Fixed\n`HttpApi`\n\nruntime shape. - Allowed additional\n`HttpApiClient`\n\noptions. - Also fixed\n`Schedule.andThenResult`\n\nto correctly emit self outputs as`Failure`\n\nand other outputs as`Success`\n\n.\n\n### Atoms & Reactivity\n\n- Added custom equality detection for atoms to prevent unnecessary re-renders.\n- Fixed atom dependencies during batch rebuilds.\n- Used\n`Set`\n\ns to track atom relationships for improved correctness and performance of the reactivity graph.\n\n### OpenTelemetry\n\n- Preferred explicit OTLP resource configuration over implicit detection.\n- Rendered nested error causes in tracer exception events for deeper observability into chained failures.\n\n### AI\n\n- Fixed OpenAI compat parallel tool calls.\n- Fixed encoding of system messages as input text.\n- Added\n`platform`\n\nliteral to`HttpPlatform`\n\n. - Fixed provider-defined tools (tool cloning and Anthropic client tools).\n- Removed the legacy LSP in favor of\n`effect/tsgo`\n\n. - Fixed OpenRouter dynamic tools sending an empty parameters schema.\n- Preserved OpenAI Responses cache write token usage.\n\n### LayerRef\n\nAdded a new `LayerRef`\n\nmodule for holding a reference to a `Layer`\n\nthat can be swapped at runtime, useful for testing and dynamic configuration scenarios.\n\n### FileSystem\n\n- Added\n`glob`\n\nsupport to the`FileSystem`\n\nmodule for pattern-based file discovery. - Fixed\n`FileSystem.watch`\n\nrecursive control.\n\n### CLI\n\n- Reintroduced CLI wizard mode.\n- Added CLI config for built-in flags.\n- Fixed missing flag value handling. Fixed\n`Command.withSubcommands`\n\nlosing context type inference. - Fixed end-of-options operands for subcommands.\n- Fixed positional argument overflow.\n- Escaped control characters in error output.\n- Removed the doubled “Expected” prefix from\n`InvalidValue`\n\nmessages. - Preserved chained vitest helpers like\n`it.describe.each`\n\nthrough the`it`\n\nproxy. - Added general cleanups.\n\n### New Core APIs\n\nAdded `Effect.reduce`\n\nfor folding over a collection of effects into a single accumulated result.\n\n### MutableList\n\nFixed `MutableList.filter`\n\nempty-state handling to prevent incorrect state after filtering all elements.\n\n### Config & URL\n\n- Treated empty config strings as missing data, aligning with the principle of least surprise for environment variable–backed config.\n- Moved\n`UrlParams.makeUrl`\n\nto`Url.make`\n\nfor a cleaner API surface, and accepted`UrlParams.Input`\n\nin additional`UrlParams`\n\nAPIs for more ergonomic URL construction.\n\n### String Utilities\n\nFixed string case conversion for numeric word segments, e.g. `\"v4Beta\"`\n\nnow correctly converts to `\"v-4-beta\"`\n\ninstead of losing the digit boundary.\n\n### Entity & Cluster\n\n- Cached clients by entity reference for better performance.\n- Isolated cluster entity handler context from the fiber that first wakes it, fixing a subtle context leak.\n\n### Performance\n\n- Optimized Bun stream reading.\n- Forked memo maps on nested layer builds to prevent cross-build contamination.\n- Stopped using\n`performance.timeOrigin`\n\nand switched to lazy origin calculation to avoid issues in environments where the Performance API is restricted. - Avoided\n`runSyncExit`\n\ndispatcher allocation in the fiber runtime.\n\n### Bun\n\nConstructed empty Bun multipart streams per-request to prevent cross-request state contamination.\n\n### Documentation\n\n- Fixed error names in JSDoc comments.\n- Documented\n`ChildProcess`\n\nenvironment behavior. - Migrated docgen.\n- Clarified\n`GenericTag`\n\nkey documentation.\n\n## Keep up with the Effect v4 beta\n\nIf you missed the earlier updates, the [June recap](https://effect.website/blog/effect-v4beta-june-recap/) and the [February–May recap](https://effect.website/blog/effect-v4beta-launch-to-may-recap/) cover all the major changes since the v4 beta launch.\n\nFor week-by-week updates, follow the [This Week in Effect](https://www.effect.website/blog?category=this-week-in-effect#blog-grid) series.\n\nTo try the Effect v4 beta:\n\nHappy Effecting. 🚀", "url": "https://wpnews.pro/news/effect-v4-beta-july-2026-updates", "canonical_source": "https://effect.website/blog/effect-v4beta-july-recap/", "published_at": "2026-07-31 00:00:00+00:00", "updated_at": "2026-08-21 16:15:43.509382+00:00", "lang": "en", "topics": ["developer-tools"], "entities": ["Effect-TS", "Effect v4", "Deno", "Node.js", "Bun"], "alternates": {"html": "https://wpnews.pro/news/effect-v4-beta-july-2026-updates", "markdown": "https://wpnews.pro/news/effect-v4-beta-july-2026-updates.md", "text": "https://wpnews.pro/news/effect-v4-beta-july-2026-updates.txt", "jsonld": "https://wpnews.pro/news/effect-v4-beta-july-2026-updates.jsonld"}}