effect
4.1.4 · 11 Nov 2026MIT66.6M / weekRepositoryHomepagenpmAtom feed
4.1.5 is the newest release of 4.x.
In short
31 fixed
Release note
Patch Changes
Preserve all Anthropic system instructions and support configurable mid-conversation system messages. Add optional
LanguageModel.supportsSystemMessagesInHistoryto query support with scoped overrides.Cache per-tool response schemas and parameter-mode copies to reduce schema construction in
LanguageModel.generateTextandLanguageModel.streamText. The schema cache also applies to direct calls toResponse.Part,Response.StreamPartandResponse.AllParts.Treat interruption as abandonment in
Effect.cached,Effect.cachedWithTTL,Effect.cachedInvalidateWithTTL,Cache,ScopedCache,RcRef,RcMapand the clusterResourceMap. Concurrent callers share one computation that is interrupted only after every caller has been interrupted, interrupted results are never cached, and a call made while an abandoned computation is still finalizing starts a fresh one.Adjust
Effect.cachedInvalidateWithTTLtypes to accept callbacks that select a TTL from the computation'sExit, including piped calls.Prevent entity registration when shard ownership is lost during construction. Pending requests retry on the new owner.
Avoid replaying suspended cluster workflows for unawaited deferred checkpoints while preserving interrupt wakes.
Fix cluster defect recovery to replay unfinished requests without duplicating requests awaiting their first dispatch. Stop replay and interrupt waiting requests on shutdown, and prevent superseded rebuilds from publishing stale handlers or SQL lock connections.
Prevent PostgreSQL deadlocks between cluster message claims and shard or address resets by locking reset rows in message order.
Fix zoned DateTime conversion on runtimes that omit Intl fractional seconds, preserving milliseconds for pre-epoch timestamps.
Preserve a fiber's
AsyncLocalStoragecontext when another fiber wakes or interrupts it. RunEffect.tryPromiseerror handlers in the resumed fiber's context.Fix
HashRing.getShardsreturning different shard assignments for the same nodes and weights after different add/remove histories. Sum weights in node-key order and break hash ties by node key. Assignments may change for fractional weights or hash ties.Prevent HttpApiSchemaError from being reported as a server failure for invalid requests.
Log client-abort-only HTTP request causes as "Sent HTTP response" rather than an interrupt error, while preserving response status annotations and logging other causes.
Fix HttpTraceContext decoding of B3 debug and legacy sampling values, and reject all-zero W3C trace and parent IDs.
Preserve pending interruptions when an uninterruptible effect fails. Drop typed failures when interruption skips recovery handlers, but keep defects.
Fix JSON Schema pattern importing for valid expressions whose RegExp source is canonicalized, including slashes, empty patterns, and literal line terminators.
Fix encoding optional MCP fields whose schemas decode to classes, such as
Implementation.icons.Prevent shard lock refreshes from releasing shards acquired while the refresh is in flight.
Prevent singleton shard reassignment from durably cancelling outstanding RPC requests.
Honor If-Range in HttpStaticServer, returning the full file when the entity-tag is stale or weak instead of serving a partial response. Reject date validators because filesystem metadata cannot establish their strength.
Fix
Stream.scanto emit its initial state for empty streams.Fix accumulated rate drift in
Stream.throttlewith the"shape"strategy by retaining token debt after early wake-ups. Use monotonic time so wall clock changes do not affect throttling.Preserve server and client extension capabilities in stateful MCP protocols.
Keep idle MCP HTTP subscriptions open on Cloudflare Workers with SSE keepalives.
Fix
Poolusage TTL to expire only idle, unreserved excess items, oldest idle first. Measure idle time from the last release to avoid retiring recently used items.Fix
RpcClientstream interruption leaving chunk delivery blocked on a full buffer and stalling the shared protocol receive loop.Keep streaming RPC chunk decode failures local to the affected request and interrupt it on the server, without disconnecting unrelated requests.
Fix
RpcClientprotocol errors incorrectly failing requests started synchronously by error handlers. Only requests pending when the error broadcast begins now receive that error; new requests remain pending for their own responses.Fix RPC stdio shutdown to drain responses after stdin EOF.
Set
ScopedCacheentry expiry before waking lookup waiters, so a zero-TTL result cannot be reused.Pause schedules while
Stream.aggregateWithin,Stream.groupedWithinandStream.aggregateare idle. When a schedule ends, emit the current aggregation and drain sink leftovers without further upstream pulls.
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.