effect
4.1.4 · 11 Nov 2026MIT66.6M / weekRepositoryHomepagenpmAtom feed
4.1.5 is the newest release of 4.x.
In short
8 new1 faster20 fixed
Release note
Patch Changes
Bound sparse array indices in
SchemaGetter.makeTreeRecord, used bySchema.fromURLSearchParamsandSchema.fromFormData. An indexed container with more than 20 holes is now returned as an object keyed by its index strings instead of a sparse array, and appending after the maximum array index no longer throws.Bound import-time stack detection probes to the frames they inspect, restoring the caller's stack trace limit afterward.
Stop grouped RequestResolvers from retaining batch keys for the lifetime of the resolver. Equal keys are now matched by the pending batch map, so a key is dropped as soon as its batch stops pending, including after interruption.
Support an explicit client
servernamefor TLS socket upgrades without changing hostname behavior when omitted.Use decoded response aliases in generated HTTP clients. Render bare numbers with a standard leading finite check as
Schema.Finite, preserving annotations and other checks.Optimize
Context.pickfor zero or one service.Fix zoned
DateTime.addandDateTime.subtractto apply hours, minutes, seconds and milliseconds as elapsed time across DST transitions.Add
toolCallValidation: "deferred"for callers usingdisableToolCallResolution: true. Model-generated tool calls return withunknownparameters, including invalid parameters and undeclared tool names, even without a toolkit. Supported by the Anthropic, OpenAI, and OpenAI-compatible providers. Strict validation remains the default; provider-executed calls remain validated.Add experimental
effect/graphqlwith typed operations, middleware, HTTP and subscription transports, partial results, serializable errors and cursor pagination.Fix
HttpClient.withRateLimiterreading aRetry-AfterHTTP date as a number of seconds.Add
McpServer.layerHttpRequestScopedfor serverless hosts such as Cloudflare Workers. Each POST is served by an MCP server owned by that request, so no fiber or timer outlives the request. The new layer accepts only sessionless protocol adapters such asv2026_07_28, with no subscription or session termination options.McpServer.layerHttpretains its long-lived server behavior.Tighten colliding bounds in place when exporting JSON Schema, instead of moving them into
allOf. This applies to numeric, length, item-count and property-count bounds, and an inclusive or exclusive bound implied by the other on the same side is dropped. For example,Schema.Naturalnow exportsminimum: 0, andSchema.Int.check(Schema.isGreaterThan(0))exportsexclusiveMinimum: 0without the safe-integerminimum.Fix
Multipart.toPersistedfailing for uploads named.or..and for long multi-byte file names.Add
NetAddress.loopbackAddresses.Add
Host.toFullyQualified,Host.toRelative, andHost.parseHostsFile.Persist outgoing cluster messages while the locally assigned shard is waiting for its lock.
Prompt.fromResponsePartsnow keeps streamed text and reasoning in stream order, and keeps partial text from unended text blocks.Release the durable waits of losing
DurableDeferred.raceAllbranches once the race settles, so a late completion such as a losingDurableClock.sleepno longer preempts and replays the continuing workflowHonor
Retry-AfterinHttpClient.retryTransient.Allow configuring Scalar's preferred authentication security scheme through HttpApiScalar without a TypeScript cast.
Fix cluster Sharding startup accessing storage-loop state before initialization, preventing a scheduler-dependent ReferenceError and delayed initial storage reads.
Fix
Sink.takeUntilandSink.takeUntilEffectdropping the element after a match. They now stop at the match and return the remaining input as leftovers.Add
dispatchEmptyNamedEventstoSsedecode options. It also dispatches an event that sets anevent:name but has nodata:line, which protocols such as graphql-sse use forcomplete.Fix quadratic parsing time in
Sse.makeParserandSse.decodefor long lines split across many chunks.Complete HTTP server spans synchronously before the request fiber exits, preventing completed spans from being lost during immediate runtime shutdown.
Clean up unused Anthropic bindings and make documentation-only imports type-only, preserving server-tool inputs and documentation links.
Merge outer headers and cookies into a copy of a raw
ResponseinHttpServerResponse.toWeb, leaving the original headers unchanged. This supports immutable headers and prevents cookies from accumulating across requests that reuse a response. Responses with nothing to merge are returned unchanged.Wake a suspended
WorkflowEngine.executecaller as soon as its workflow has a final result, instead of waiting for the nextsuspendedRetrySchedulestep. A replay that suspends again does not spend a step of the schedule. WithClusterWorkflowEngine, only callers on the runner that owns the execution are woken early; other callers keep relying onsuspendedRetrySchedule.HttpEffect.toWebHandlernow interrupts a streamed response body when the request is aborted after its headers were sent, even if the body is no longer being read, which releases the request scope.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.