npm / effect
effect
What changed in effect 3 to 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.
59 breaking5 security1 deprecations103 new APIs and options14 performance31 behavior and defaults2 tooling210 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initeffect 4345 changes
Breaking changes 57
Supports structured decision instructions, descriptions, and score legends; accepts labeled descriptions.
The dev metadata field is now a bigint.
The ino, rdev, nlink, and blocks metadata fields are now Option<bigint>, preserving values outside the safe integer range.
Rejects object patterns with keys the input type does not have.
Rejects object patterns with keys the input type does not have.
Rejects object patterns with keys the input type does not have.
Rejects object patterns with keys the input type does not have.
Types require schema services for resource templates and encoding services for prompt parameters with completion handlers, catching missing services at compile time.
Criteria entries are now { label, description } objects instead of strings.
Rejects duplicate discriminants at compile time, including nested unions and numeric/string property-key collisions.
Adds the URL-parameter redaction defaults moved from Headers.CurrentRedactedNames; custom lists replace these defaults.
Failure-suspended workflows no longer retry failed activities until explicitly resumed; interrupting one completes it as interrupted without rerunning the activity.
Indexed containers with more than 20 holes are returned as objects keyed by index strings instead of sparse arrays; appending after the maximum array index no longer throws.
Indexed containers with more than 20 holes are returned as objects keyed by index strings instead of sparse arrays; appending after the maximum array index no longer throws.
Rejects single-header and multi-header trace contexts with invalid trace or span identifiers.
Subscriptions no longer receive deferred list-change notifications emitted before they subscribed; coalesced runtime changes are preserved.
Subsequent delta histogram exports omit min and max because cumulative extrema do not describe the reported interval.
COMMIT errors become typed SqlError failures when cleanup succeeds; if cleanup fails, both errors remain defects to prevent typed recovery from hiding an unsafe connection state.
The duplicate Anthropic response options for cache creation and cache reads are removed.
Config parsing preserves provider defects and interruption reasons, and
Config.orElseno longer recovers mixed causes.AI tracing renames the concurrency span attribute to
effect.ai.concurrency.AI tracing renames the object-name attribute, and object choices are JSON-encoded.
AI tracing renames the tool-choice attribute; it records the resolved value and defaults to
auto.Failures containing defects or interruptions are no longer retried.
Response encoding failures now return 500 and reach ErrorReporter; request decoding failures remain 400 and unreported, and response failures remain HttpApiSchemaError values.
Interrupt-only spans are Unset with
effect.fiber.interrupted: truerather than Ok with an Interrupted description and legacy attributes.Missing required session headers and initialize requests carrying a session header now return JSON-RPC error bodies.
OpenAI service-tier and system-fingerprint tracing attributes move from
gen_ai.openai.*toopenai.*.Each summary exports as one cumulative OTLP Summary metric named by its id rather than separate quantiles, count, and sum metrics; common units map to UCUM and large bigint values retain precision.
Writes store entry and remote IDs as BYTEA and decode BIGINT timestamps returned as strings or bigints; existing UUID tables require manual migration or recreation.
AI tracing replaces the
systemoption andgen_ai.systemwithprovider: { name }andgen_ai.provider.name; related attribute types are renamed.NaN and fractional capacities are rejected to prevent nonterminating batch publication; Infinity remains supported.
The OpenAI response-format telemetry option and
WellKnownResponseFormatare removed.The data-last overload now returns the handler's error type instead of the original error type.
The AI tracing token option, token attribute types, and
gen_ai.token.typespan attribute are removed.Suspended workflows are no longer replayed for unawaited deferred checkpoints, while interrupt wakes are preserved.
Concurrent callers share one computation, which is interrupted only after every caller is interrupted; interrupted results are not cached, and calls during finalization start fresh computations.
Replaces FiberRef.
Modules including effect/http, effect/rpc, and effect/schema import from effect/<area>; unstable APIs may break in minor releases, while untagged APIs follow semver.
Requires React 19.
Requires Deno 2.8.3 or newer.
Uses a built-in PostgreSQL client with pipelining, prepared statements, and binary codecs, and no longer depends on pg.
Uses Node's built-in node:sqlite and requires Node 22.16 or newer.
Runs property tests with the native Arbitrary module and supports Vitest fixtures.
Now returns successes before failures; swap tuple order from the previous
[failures, successes]order.Array, Chunk, Effect, and Record partition functions now return successes before failures; swap tuple order from the previous
[failures, successes]order.Now holds Queue.Taker entries; resume an entry with
entry.resume(...)instead of calling it as a function.Remains suspended until its requested batch is available instead of entering a synchronous retry loop that can starve the host.
In-flight RPC calls fail when a socket misses a pong, even with transient connection retries enabled; missed pongs no longer invoke onTransientError.
Schema v4 is a new implementation with faster parsing, class-based schemas, make constructors on every schema, and effectful decoding with services.
Accepts a single concrete brand identifier; apply it repeatedly to compose distinct brands. Brand identifiers are type-only and are no longer stored in AST annotations or preserved by SchemaRepresentation.
Requires the constructor's sole brand key; apply it repeatedly to compose distinct brands. For enum brand keys, pass the enum member instead of its string value.
No longer preserves brand identifiers; reapply Schema.brand after rebuilding a representation when a branded TypeScript type is required. Also preserves ordering of equal-priority union members sharing an AST in JSON and string-tree codecs.
Array, Chunk, Effect, and Record separate helpers now return successes before failures; swap tuple order from the previous
[failures, successes]order.TypeScript 5.9 or newer is required; TypeScript 7 is recommended.
Replaces verifyLosslessTransformation; existing callers must update to the new name.
@effect/vitest and @effect/doctest require Vitest 5.
Security 4
Sensitive query values and URL credentials are redacted in spans, request inspection, and errors without changing URLs sent over the wire.
Adds middleware that decompresses gzip and deflate request bodies, limits decompressed size, and rejects other codings with 415.
The shared connection is held for the entire statement or stream, preventing another fiber's transaction from rolling back an acknowledged write or exposing uncommitted rows to a plain read.
Fixes decoding of B3 debug and legacy sampling values and rejects all-zero W3C trace and parent IDs.
New APIs and options 90
Adds an option for discarded child workflows; detached children neither wake their parent on completion nor get interrupted with it.
Adds GNU-style flags with optional values: a bare flag uses the given value, while an explicit value must be attached with
=.Supports per-request URLs supplied as a function of context and operation or as an Effect<string>; GraphQLResolver batches lookups by URL.
Adds gzip and deflate request body compression.
Supports per-request URLs supplied as a function of context and operation or as an Effect<string>; GraphQLResolver batches lookups by URL.
Enables opt-in gzip compression for built-in OTLP JSON and protobuf exporters.
Built-in OTLP JSON and protobuf exporters support opt-in gzip compression through the compression option or OTLP compression environment variables; defaults remain uncompressed.
Resolves a relative path beneath a root and returns Option.none() for traversal escapes and rooted inputs using platform path rules.
Adds an API for checking whether a URL parameter name is redacted.
Adds an API for explicitly redacting URL parameters.
Adds an API for explicitly redacting URLs.
Adds an SSE decode option that dispatches named events with no data line, supporting protocols such as graphql-sse.
Adds experimental GraphQL support with typed operations, middleware, HTTP and subscription transports, partial results, serializable errors, and cursor pagination.
Adds a hosts file parsing utility.
Adds a host conversion utility.
Adds a host conversion utility.
Allows configuring Scalar's preferred authentication security scheme without a TypeScript cast.
Adds a request-scoped HTTP layer for serverless hosts; each POST uses an MCP server owned by that request, with only sessionless protocol adapters supported.
Adds loopback address support.
TLS socket upgrades accept an explicit client servername without changing hostname behavior when it is omitted.
The deferred mode lets callers using disableToolCallResolution return model-generated tool calls with unknown parameters, including invalid parameters and undeclared tool names; strict validation remains the default.
Exported terminal-cell width measurement using the same logic as built-in CLI help and tables.
Separate migration and storage layers allow applications to use tables migrated by an owner connection.
Interrupts opted-in RPCs as soon as entity termination starts; persisted requests resume under the next owner without saving an interrupt reply, and server-side Uninterruptible takes precedence.
Adds PowerShell CLI completions using powershell or its pwsh alias.
Now accepts an optional format option; the default is a lowercase hyphenated UUID string, while bytes returns a 16-byte Uint8Array.
Now accepts an optional format option; the default is a lowercase hyphenated UUID string, while bytes returns a 16-byte Uint8Array.
Adds UDP support on Node, Bun, and Deno.
Added a constructor for DNS name server inputs.
Accepts address inputs; platform DNS services also accept name server inputs, and Dns.nameServerFromInput is added.
Adds experimental Host, Dns, and AddressResolver modules with Node, Bun, and Deno services for host parsing, DNS queries, and endpoint resolution; services must be provided explicitly.
Adds fromInput constructors to the effect/net data types.
Adds TLSA records and Schema.DnsTlsaRecord; Node.js queries them with resolveTlsa on Node.js 22.15 or 23.9 and later, while other listed runtimes return Unsupported.
Accepts a position option for concurrent reads that leave the cursor unchanged.
Accepts a position option for concurrent reads that leave the cursor unchanged.
The noFollow option rejects symlinks at the final path component; it is supported on Node and Bun on POSIX, while Windows and Deno return BadArgument.
Setting allowSubscriptions to false disables v2026_07_28 subscriptions while keeping request-scoped progress and log notifications.
Adds conversion for runtime-reported addresses.
The delay option postpones an element's first delivery in the memory, Redis, and SQL stores.
Adds onPingTimeout to distinguish ping timeouts from other socket failures; it runs before onDisconnect and in-flight call failures when a ping timeout drops an open connection.
Adds onPingTimeout to distinguish ping timeouts from other socket failures; it runs before onDisconnect and in-flight call failures when a ping timeout drops an open connection.
Exports exact JSON Schema integers bounded by JavaScript's safe integer limits; composed bounds retain tighter constraints and exact integer branches preserve oneOf.
Adds stderr terminal detection with an overridable false default and runtime detection for Node.js, Bun, and Deno.
Provides deterministic random operations derived from a seed while preserving a platform crypto service's digest implementation.
Node and Bun clients can send handshake headers alongside subprotocols through socket constructors, channels, and layers; browser-compatible constructor calls are preserved when headers are absent.
This opt-in option for McpServer.layerHttp lets DELETE end a session and interrupt active requests; later requests with that session id return 404.
More atom registry APIs are exposed.
DecisionModel.decide accepts image input; providers opt in with
supportsImages: trueand receive images throughProviderOptions.images.Anthropic input-token usage now includes cached tokens, with cache reads and writes reported in separate usage attributes.
Completion-handler services, including optional handlers, are included in the requirements.
RPC socket clients gain a configurable ping interval; the default remains five seconds and any decoded server frame counts as liveness.
RPC socket clients gain a configurable ping timeout; the default remains five seconds.
Image input is passed to supporting providers through this option; unsupported models reject nonempty image input.
Schemas returned by this API expose the selected tag property key through
tag.Schemas returned by this API expose the selected tag property key through
tag.SQL statement span-naming rules are exported through Statement.spanName and Statement.spanTarget.
SQL statement span-target rules are exported through this API.
Providers can opt in to image input by setting
supportsImages: true.Types now accept callbacks that select a TTL from the computation's Exit, including piped calls.
Adds an optional capability query for support of system messages in conversation history, with scoped overrides; Anthropic system instructions are preserved.
A new module is available.
Services are now defined with Context.Service.
A new module is available; Node, Bun, Deno, and browser packages provide the platform Crypto service.
A durable queue is available.
Adds EmbeddingModel, the DecisionModel classification and rating API, dynamic tools, and tool approvals.
Models network addresses.
Adds full Deno support.
Adds SSR hydration, stale-while-revalidate atoms, and serializable RPC and HttpApi queries.
Software transactional memory is built into Effect.tx, with TxRef and related transactional data types.
A new module is available.
HTTP modules add graceful server shutdown.
Supports typed response headers, streaming and SSE responses, and the HTTP QUERY method.
Adds in-memory testing for HttpApi.
The browser package adds IndexedDB support.
A new module is available.
A new module is available.
Supports protocol versions 2024-11-05 through 2026-07-28, including elicitation, sampling with tools, resource subscriptions, and typed tool output.
A new module is available.
Can be configured with standard OpenTelemetry environment variables.
HTTP modules add rate-limited clients.
HTTP modules add response compression.
Provides a compact binary codec and is the default wire format for cluster transports.
Powers JSON Schema import and export, TypeScript code generation, and AI structured output.
A new module is available.
Runner memory can be bounded with ShardingConfig limits.
Exposes structured reasons such as UniqueViolation.
HTTP modules add static file serving.
Adds succeedEffect, failEffect, and verifyRoundTripEffect so assertions can use the calling Effect's services, test clock, and interruption; the module and its public APIs are unstable.
Workflows can be declared with class syntax.
An in-memory workflow engine is available.
Performance 9
Caches the last response decoder for each response kind, keyed by validation mode and ordered tool schema identities.
Reduces statement overhead by borrowing the shared connection while preserving semaphore exclusion and failed-COMMIT recovery.
Optimized for picking zero or one service.
Fixes quadratic parsing time for long lines split across many chunks.
Fixes quadratic parsing time for long lines split across many chunks.
The Kubernetes service-account token is cached for one minute so rotated credentials are picked up without reading the token file on every request.
Caches per-tool response schemas and parameter-mode copies to reduce schema construction.
JIT and AOT decoding of transformations whose source has checks is faster; compiled TemplateLiteral validation enforces oneOf parts and preserves interpreter diagnostics in transformation chains.
Resolves candidate parsers once per union instead of on every decode, reducing allocations and improving decoding and encoding speed.
Behavior and default changes 28
Span names use only the entity type to stay low-cardinality; the entity ID remains in the entity.id attribute.
Stores attempt metadata; yield it inside a transaction body to read attempt, retryReason, and schedule-like timing fields.
Colliding numeric, length, item-count, and property-count bounds are tightened in place rather than moved into allOf; redundant same-side bounds are dropped.
Wakes a suspended caller as soon as its workflow has a final result instead of waiting for the next retry schedule step; a replay that suspends again does not spend a step.
The passed effect counts as in-flight work, so a parked sibling no longer suspends the run while it executes.
Interrupted server-to-client requests now send MCP cancellation notifications instead of internal RPC control messages.
CLI prompts and the command wizard respect NO_COLOR by suppressing color and style escapes while preserving cursor and redraw controls.
JSON logs and Node inspection serialize SchemaError as a compact object with its tag and formatted message instead of schema AST nodes.
Shutdown hands off shards one at a time after entities and singletons stop; handoff waits are bounded, and shutting-down runners no longer acquire shards.
Input is acquired only when a prompt needs it, leaving piped stdin untouched for constant fallback prompts.
The result type now includes runtime layer errors.
For non-object failures, the internal stack frame is no longer captured; the stack contains the message and span frame when available.
Batches of at least two statements are named BATCH or BATCH {target}, with
db.operation.nameset to BATCH anddb.operation.batch.sizerecorded.HTTP tracing, logs, traces, and resources are aligned with OpenTelemetry conventions; homogeneous primitive arrays export as array attributes.
SQL tracing records Effect execution methods here instead of in
db.operation.name.HTTP tracing aligns span names, response error status, server addresses, and ports with OpenTelemetry conventions; header capture is opt-in.
LanguageModel spans are client spans and record
gen_ai.output.typeastextorjsonfor every provider.Default span names are now RPC methods, such as Echo.Ping rather than RpcClient.Echo.Ping; set spanPrefix to retain the old names.
Client and server spans set their respective span kinds and record
rpc.system.nameas effect_rpc and therpc.methodattribute; user spanAttributes still override these.Modules and directly importable exports receive explicit stability tags; stable follows strict semver and unstable may break in minor releases.
Helpers now allow interruption while waiting for locks, while preserving automatic release after acquisition.
Helpers now allow interruption while waiting for permits, while preserving automatic release after acquisition.
Schedules pause while aggregation is idle; when a schedule ends, the current aggregation is emitted and sink leftovers are drained without further upstream pulls.
Separates wall-clock time from monotonic time.
Effect 4.0 is the first stable release of v4, replacing the beta and release-candidate series.
Aligns logs and spans with the OpenTelemetry specification.
Becomes schema-aware and supports server-originated requests and notifications.
Has a pull-based reader with backpressure and STARTTLS support.
Tooling 2
Becomes a native property-based testing module and no longer depends on fast-check.
Adds global flags, command aliases and examples, an interactive wizard mode, and Bash, Zsh, and Fish shell completions.
Fixes and other changes 155
When the input is a mutable array, the onNonEmpty callback receives a NonEmptyArray.
Failures now carry the combined record or tuple as previousSuccess instead of a single input's value.
Late reads of uninitialized dependencies no longer cause infinite atom rebuilds.
Deferred callback wakes are no longer lost when an activity suspends while a parallel activity is running.
Expanded values are no longer rescanned; self and circular references do not overflow, escaped references stay literal, and defaults apply to empty expansions.
Expanded values are no longer rescanned; self and circular references do not overflow, escaped references stay literal, and defaults apply to empty expansions.
Conversions handle very large millisecond values without throwing, compare equal to nanosecond equivalents, and preserve nanosecond precision for large integer millisecond values.
Waits for filesystem watcher installation and all GraphQL watch subscriptions, including nested directories, before generating so startup edits are not missed.
Accepts Redacted values as URL parameters.
Handler-local request.url is corrected for parameterized and percent-encoded prefixes, respecting duplicate-slash configuration.
Interruptions no longer call Math.random and hashing defects, preventing deterministic hosts that forbid randomness from looping forever or overflowing the stack.
Tool approvals are collected once per request instead of twice.
Persisted local replies are recovered from storage to prevent requests hanging when replies arrive before handler registration; terminal in-memory publication waits for the outer transaction to succeed.
Array and variadic tuple patterns narrow only the matched prefix, leaving remaining elements with their original type.
Preserves completion-handler service requirements in URI templates when handlers take a context argument.
Preserves completion-handler service requirements in URI templates when handlers take a context argument.
Healthy connections are no longer closed before a ping when its tick runs late; slow requests stay connected while the server responds.
Decoding stays synchronous when a decoding default is an already-successful effect such as Effect.succeed(...).
CR and CRLF line endings in event data now start a new data line, like LF, preventing data from being dropped after a lone CR.
No longer hangs when an async iterator's pending next() never settles.
No longer hangs when an async iterator's pending next() never settles.
Does not call a custom transform for input without words, such as an empty string or
---.No longer throws on trailing underscores or even-length underscore runs; trailing underscores are dropped and even-length runs return an empty string.
No longer throws on trailing underscores or even-length underscore runs; trailing underscores are dropped and even-length runs return an empty string.
Interrupted sleeps are removed and new sleeps are inserted in order instead of re-sorting the queue.
No longer skips sleeps registered by a woken fiber after more than one scheduler hop.
No longer skips sleeps registered by a woken fiber after more than one scheduler hop.
64-bit trace IDs are padded to 128 bits in OTLP exports and traceparent headers.
Accepts Redacted values as URL parameters.
Outgoing cluster messages are persisted while the locally assigned shard is waiting for its lock.
Fixes startup accessing storage-loop state before initialization, avoiding a scheduler-dependent ReferenceError and delayed initial storage reads.
Zoned additions apply hours, minutes, seconds, and milliseconds as elapsed time across DST transitions.
Zoned subtractions apply hours, minutes, seconds, and milliseconds as elapsed time across DST transitions.
Releases durable waits from losing branches when the race settles, so late completions no longer preempt and replay the continuing workflow.
Generated clients use decoded response aliases and render bare numbers with a standard leading finite check as Schema.Finite, preserving annotations and other checks.
Honors the Retry-After response header when retrying transient failures.
Correctly reads a Retry-After HTTP date instead of treating it as a number of seconds.
Interrupts a streamed response body when its request is aborted after headers are sent, even if the body is no longer being read, releasing the request scope.
Merges outer headers and cookies into a copy of a raw Response, leaving original headers unchanged and preventing cookies from accumulating across reused responses.
Fixes persistence failures for uploads named . or .. and for long multi-byte file names.
Keeps streamed text and reasoning in stream order and preserves partial text from unended text blocks.
Grouped resolvers no longer retain batch keys for their lifetime; keys are dropped when their batch stops pending, including after interruption.
Stops at the matching element and returns the remaining input as leftovers instead of dropping the element after a match.
Stops at the matching element and returns the remaining input as leftovers instead of dropping the element after a match.
Orphaned activity requests now receive Suspended instead of waiting indefinitely for replay registration.
Persisted requests deliver terminal replies only after commit or clean rollback; on transaction failure, they recover a committed reply or retry the request.
Workflow branches continue after recording a result instead of stalling until a concurrently parked sibling is woken.
Returns Some for infinite nanosecond totals instead of None.
Infinite nanosecond totals now return an infinite duration instead of throwing.
Multiplying a nanosecond-backed duration by fractional or non-finite numbers no longer throws; fractional results round to the nearest nanosecond.
Synchronous re-entry no longer causes crashes or premature interruption in cached effects.
Request-path normalization now preserves duplicate slashes in query values.
OTLP exporters retain all finite boundaries and overflow observations; Prometheus emits a single +Inf bucket.
Waits for the reported reset once a response's remaining budget is exhausted, including when a limit header is also present.
Interrupted activities can run again when replaying a preempted execution.
Cancellation that withholds every reply returns an empty 200 text/event-stream response; other request POSTs ending without a response return 500.
WithTransaction RPCs save typed failures and non-fatal defects after rollback so retries receive the stored reply; successful replies still commit with handler writes.
Encoding failures are reported to ErrorReporter, and client defects include the RPC tag.
When response encoding fails, the span ends with the encoding defect instead of recording a client interruption.
Exports exact JSON Schema integers bounded by JavaScript's safe integer limits; composed bounds retain tighter constraints and exact integer branches preserve oneOf.
Shard handoffs now propagate interrupts and stream acknowledgements to draining requests, accept acknowledgements after client EOF, and wait briefly to serve volatile requests during handoff.
Property checks, schema generation, and shrinking now propagate defects and interruptions accompanying typed failures, while removing typed failures from mixed causes.
The data-last overload now correctly infers a changed success type.
This API no longer throws when
windowis undefined.Writing search parameters now preserves the URL hash and omits empty query strings.
This API no longer throws when
windowis undefined.Result types are corrected for union response modes while omitted mode continues to produce decoded-only results.
An interruption race no longer leaves an abandoned lookup running or its key stuck in the cache.
Resources are no longer leaked when interrupted during acquisition.
Options are derived from the TextDecoder constructor so declarations work with Node-only types without requiring the DOM library.
Concurrent flatMap no longer drops inner scope finalizer defects; usage and release failures are both preserved.
The data-last overload now preserves channel requirements and adds the mapping function's requirements.
A side finalizer failure no longer causes merge to hang or succeed; usage and finalizer failures are both preserved.
Inner scope finalizer defects are no longer dropped; usage and release failures are both preserved.
The returned Effect now includes the channel's error type.
Record values now preserve separators, including base64 padding in OTLP headers.
Repeated DST intervals no longer produce past occurrences or exhaust the search limit.
Throwing error mappers become defects instead of escaping asynchronous callbacks and leaving fibers suspended.
Finalizer defects are preserved.
Finalizer defects are preserved.
Fallback steps preserve errors and service requirements from layers, predicates, and schedules; captured services are provided to schedules.
Redaction handles getter-returned values with toJSON without invoking getters twice.
Single-value array fields are now accepted in form-urlencoded and GET payloads.
Result types are corrected for union response modes while omitted mode continues to produce decoded-only results.
Unread responses are no longer retained on runtimes without FinalizationRegistry, such as Hermes.
Cookies can now be read on platforms whose Headers lacks
getSetCookie, such as React Native.For successful WebSocket upgrades, server middleware now receives status 101 rather than the discarded handler response status.
Server spans are marked failed for 5xx responses, including rendered errors, without changing the application exit or existing span failure causes.
The serve service now infers required services from the middleware-transformed app.
Retries defer each build until execution instead of returning an already-finalized resource.
retryPolicy is now forwarded through this layer.
Shutdown finishes in-flight output before flushing remaining entries, without overlapping flushes.
Disposal no longer deadlocks when called from one of the runtime's own fibers, including child fibers.
McpServer.layerHttp uses the negotiated protocol version when a session request omits this header; invalid or mismatched protocol requests return JSON-RPC error bodies.
Completion-handler services, including optional handlers, are included in the requirements.
Queue.clear no longer swallows failures combined with Cause.Done.
Interrupted queue operations at a scheduler yield no longer lose messages.
Many equal requests sharing a pending cache entry no longer cause a stack overflow.
Successful pipeline results are returned instead of failing with a channel completion signal.
Passing
spanPrefix: "RpcClient"orspanPrefix: "RpcServer"retains the former default RPC span names.The sink's unconsumed elements are no longer dropped from a partially consumed chunk.
Overlapping windows no longer drop elements from the final partial window.
Sink failures after end-of-stream are no longer swallowed, and the stream no longer hangs when the sink finishes during an upstream pull.
The stream no longer hangs when an input completes without emitting.
Immediate opening CRLF is trimmed in basic and literal multiline strings, matching existing LF handling.
One-shot iterable inputs are preserved across transaction retries.
Block scalar chomping preserves trailing line breaks with keep indicators and avoids adding line breaks to empty or unterminated scalars.
A fiber's context is preserved when another fiber wakes or interrupts it; Effect.tryPromise error handlers run in the resumed fiber's context.
Recovery replays unfinished requests without duplicating requests awaiting first dispatch; shutdown interrupts waiters, and superseded rebuilds cannot publish stale handlers or SQL lock connections.
Reset rows are locked in message order to prevent PostgreSQL deadlocks between message claims and shard or address resets.
Entity registration is prevented if shard ownership is lost during construction, and pending requests retry on the new owner.
Returns consistent shard assignments for the same nodes and weights regardless of add/remove history; fractional weights or hash ties may have different assignments.
Client-abort-only request causes are logged as "Sent HTTP response" instead of interrupt errors, while response status annotations and logging of other causes are preserved.
Invalid requests no longer report schema errors as server failures.
Honors If-Range by returning the full file for stale or weak entity-tags; date validators are rejected because filesystem metadata cannot establish their strength.
Optional MCP fields whose schemas decode to classes now encode correctly.
Valid expressions whose RegExp source is canonicalized are imported correctly, including slashes, empty patterns, and literal line terminators.
Idle subscriptions stay open on Cloudflare Workers by using SSE keepalives.
Usage TTL now expires only idle, unreserved excess items, oldest idle first; idle time is measured from the last release.
Shutdown drains responses after stdin reaches EOF.
Stream interruption no longer leaves chunk delivery blocked on a full buffer and stalling the shared protocol receive loop.
Only requests pending when an error broadcast begins receive that error; requests started synchronously by error handlers remain pending for their own responses.
Entry expiry is set before lookup waiters wake, preventing reuse of a zero-TTL result.
Refreshes no longer release shards acquired while the refresh is in flight.
Reassignment no longer durably cancels outstanding RPC requests.
Preserves server and client extension capabilities.
Emits its initial state for empty streams.
The shape strategy retains token debt after early wake-ups and uses monotonic time so wall-clock changes do not affect throttling.
Decode failures stay local to the affected request and interrupt it on the server, without disconnecting unrelated requests.
Pending interruptions are preserved when an uninterruptible effect fails; typed failures are dropped when interruption skips recovery handlers, while defects remain.
Preserves milliseconds for pre-epoch timestamps on runtimes that omit Intl fractional seconds.
A stale finalizer no longer evicts a newer cached atom.
Concurrent calls no longer lose synchronous successes or failures.
Union-of-tag inference now reflects the selected RPC payloads and results instead of resolving to never.
Union-of-tag inference now reflects the selected RPC payloads and results instead of resolving to never.
Cause has a flat structure.
Custom message storage implementations must honor the optional expected reply ID to prevent stale concurrent workflow resumes from clearing a newer completed reply.
All Effect packages share one version number and are released together; use the same version of effect and every @effect/* package.
Preserves sibling and callback cleanup failures alongside interruption in concurrent execution, including shared Layer.build.
Preserves sibling and callback cleanup failures alongside interruption in concurrent execution.
Interrupts losing effects when the race settles or is interrupted while other effects are still starting.
Interrupts losing effects when the race settles or is interrupted while other effects are still starting.
Interrupts losing effects when the race settles or is interrupted while other effects are still starting.
Interrupts losing effects when the race settles or is interrupted while other effects are still starting.
The effect package has no runtime dependencies.
Union-of-tag inference now reflects the selected RPC payloads and results instead of resolving to never.
Retain the handler's failure exit through response handling and middleware.
No longer retains previously used equal object keys after replacement or removal, including when Cache and ScopedCache refresh entries on hits.
The interrupt fiberId type admits
nullemitted by JSON encoding; consumers should handlenullalongsideundefined.Decoded and encoded schema representations no longer contain duplicate references when schemas are reused through optional or mutable keys.
No longer loses parent checks when projecting checked children without transformations; suspended children remain opaque and structural checks are preserved.
No longer loses parent checks when projecting checked children without transformations; suspended children remain opaque and structural checks are preserved.
Preserves the grouping of branded union types in generated TypeScript code.
Server WebSockets close with 1000 on success, 1001 on interruption, or 1011 on failure, while preserving explicit close codes.
Failed workflow runs retry resets instead of acknowledging deferred completion before the run resumes.
effect 380 changes
Breaking changes 2
Preloaded references are released after acquisition so entries follow their idle TTL; preloading is skipped when the idle TTL is zero, and setting idleTimeToLive to Infinity keeps entries for the map's lifetime.
Wraps to the first matching day of the next month when a later matching day does not exist in the current month, preventing earlier matches from being skipped.
Security 1
Effect
AsyncLocalStoragecontext lost/contaminated inside Effect fibers under concurrent load with RPC
Deprecations 1
Deprecates Graph.neighborsDirected.
New APIs and options 13
Adds Graph.successors for querying graph successors.
Adds Cron.prev and reverse iteration support, aligning next/prev lookup tables and fixing DST handling symmetry.
Adds Effect.currentPropagatedSpan.
Adds type-level utilities for asserting layer types.
Types.VoidIfEmpty is backported to 3.x.
Adds the typeConstructor annotation for Schema.
Introduces JsonValue and uses it in JsonSchemaAnnotations to improve type safety for schema examples and defaults.
Adds options for selecting the target JSON Schema version in the make function.
Adds the RcRef.invalidate API.
Adds an experimental concurrency primitive that shares permits across keyed partitions and distributes waiting permits fairly using a round-robin strategy.
Adds Effect.fn.Return to allow typing returns on Effect.fn.
Adds an experimental HashRing module.
JSON Schema generation adds jsonSchema2020-12 as a target.
Performance 5
Uses a linear matcher when decoding template literals containing only string spans.
Prevents multiple iterations over the same Iterable.
Prevents multiple iterations over the same Iterable.
Backports an optimization to Effect.gen.
Merged layers can now be finalized in parallel.
Behavior and default changes 3
Fibers spawned by Effect.timeout no longer log unhandled errors.
The idleTimeToLive option can now be a function receiving the key and returning a duration, allowing different TTL values for different resources.
Builds synchronously when possible, so creating a ManagedRuntime may no longer require asynchronous execution.
Fixes and other changes 55
Prevents interrupted acquisition from causing an uninterrupted scope closure to fail.
Prevents interrupted acquisition from causing an uninterrupted scope closure to fail.
Fixes Reloadable.auto hanging when its scope closes.
Fixes the use of Schema.NonEmptyArrayEnsure with strings.
Fixes erroneous clearing of the entire bucket on hash collision.
Fixes erroneous clearing of the entire bucket on hash collision.
Avoids collisions between JSON key paths.
Fixes zero-capacity rendezvous behavior for take and takeN.
Fixes termination with bounded dropping and sliding buffers.
Errors from wrapped config parsers are redacted.
Fixes graph algorithm edge cases around reversal.
Fixes graph algorithm edge cases around shortest-path weight validation.
Fixes graph algorithm edge cases around strongly connected components.
Fixes graph algorithm edge cases around topological sort initials.
Fixes graph algorithm edge cases around undirected edge queries.
Fixes parsing and scheduling edge cases involving whitespace, Sunday 7, strict numeric tokens, explicit full day ranges, and month-constrained day-of-month / weekday matching.
Cron fields like 5/15 now expand from the starting value through the field maximum.
Fixes behavior when the test clock is adjusted to infinity.
Graph traversal and shortest-path algorithms now traverse undirected edges independently of their stored source/target orientation.
Records with string keys and Schema.Never values now emit additionalProperties: false.
Fixes generic type parameter inference inside $match arms.
Fractional millisecond instants are floored before conversion to BigInt.
Batched request resolver defects no longer leave request Deferreds incomplete and consumer fibers hanging forever.
Fixes Effect.annotateCurrentSpan.
Logs are now added to the first propagated span in the described Effect.fn and withSpan case.
Fixes a crash when comparing null values inside structuralRegion by guarding Object.getPrototypeOf calls.
Avoids using a class for PrettyError so error.name is preserved.
getPropertySignatures no longer throws on structs containing optionalWith variants that produce Transformation nodes.
Scheduler task draining now isolates AsyncLocalStorage across fibers.
Schema.omit now handles structs combining optionalWith transformations and index signatures without returning the wrong AST result.
Post-rest validation now checks each tail index sequentially.
Fixes a race condition that could leak permits.
Stream.changes no longer writes empty chunks.
Correctly handles multi-byte UTF-8 characters split across chunk boundaries.
Handles null and undefined when matching nullable union types, preventing crashes.
Handles null and undefined when matching nullable union types, preventing crashes.
Fixes type inference loss for complex nested structures, including unions of Effects with contravariant requirements.
Fixes the Config.orElseIf signature.
Fixes plain object comparisons in structural mode.
Effect.retry now respects the times: 0 option by checking explicitly for undefined instead of using a truthy check.
Uses performance.now only when it is available, avoiding reliance on an unavailable API.
Filters invalid non-JSON values, including BigInt and cyclic references, to prevent infinite recursion on cycles.
Prevents crashes when Hash and Equal are used with an invalid Date object.
Fixes NoSuchElementException instantiation in fastPath.
The arbitrary generator for BigDecimal now allows negative scales.
Fixed the batch size behavior for SqlPersistedQueue.
Fixes DeepMutable mapping over functions.
Config error messages use the standard formatting function.
Ensures the state transition is atomic.
Preserves context order when merging layers.
Improves the Array.window signature.
Backports updates to the Graph module.
AsEffect is now computed.
For undirected graphs, returns the other endpoint instead of the queried node when queried from an edge's target side.
Fixes tuple output for JSON Schema 2019-09 and OpenAPI 3.1.