Packages

effect

4.1.4 · 11 Nov 2026MIT66.6M / weekRepositoryHomepagenpmAtom feed

Your version

4.0.1

5 Oct 2026Where it was published

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.supportsSystemMessagesInHistory to query support with scoped overrides.

  • Cache per-tool response schemas and parameter-mode copies to reduce schema construction in LanguageModel.generateText and LanguageModel.streamText. The schema cache also applies to direct calls to Response.Part, Response.StreamPart and Response.AllParts.

  • Treat interruption as abandonment in Effect.cached, Effect.cachedWithTTL, Effect.cachedInvalidateWithTTL, Cache, ScopedCache, RcRef, RcMap and the cluster ResourceMap. 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.cachedInvalidateWithTTL types to accept callbacks that select a TTL from the computation's Exit, 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 AsyncLocalStorage context when another fiber wakes or interrupts it. Run Effect.tryPromise error handlers in the resumed fiber's context.

  • Fix HashRing.getShards returning 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.scan to emit its initial state for empty streams.

  • Fix accumulated rate drift in Stream.throttle with 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 Pool usage 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 RpcClient stream 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 RpcClient protocol 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 ScopedCache entry expiry before waking lookup waiters, so a zero-TTL result cannot be reused.

  • Pause schedules while Stream.aggregateWithin, Stream.groupedWithin and Stream.aggregate are 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.