unstale

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 init

@unstale/cli 0.1.1 on npm

effect 4345 changes

Breaking changes 57

  • Supports structured decision instructions, descriptions, and score legends; accepts labeled descriptions.

    4.0.5release notes

  • The dev metadata field is now a bigint.

    4.0.5release notes

  • The ino, rdev, nlink, and blocks metadata fields are now Option<bigint>, preserving values outside the safe integer range.

    4.0.5release notes

  • Rejects object patterns with keys the input type does not have.

    4.0.5release notes

  • Rejects object patterns with keys the input type does not have.

    4.0.5release notes

  • Rejects object patterns with keys the input type does not have.

    4.0.5release notes

  • Rejects object patterns with keys the input type does not have.

    4.0.5release notes

  • Types require schema services for resource templates and encoding services for prompt parameters with completion handlers, catching missing services at compile time.

    4.0.5release notes

  • Criteria entries are now { label, description } objects instead of strings.

    4.0.5release notes

  • Rejects duplicate discriminants at compile time, including nested unions and numeric/string property-key collisions.

    4.0.5release notes

  • Adds the URL-parameter redaction defaults moved from Headers.CurrentRedactedNames; custom lists replace these defaults.

    4.0.5release notes

  • Failure-suspended workflows no longer retry failed activities until explicitly resumed; interrupting one completes it as interrupted without rerunning the activity.

    4.0.5release notes

  • 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.

    4.0.4release notes

  • 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.

    4.0.4release notes

  • Rejects single-header and multi-header trace contexts with invalid trace or span identifiers.

    4.0.3release notes

  • Subscriptions no longer receive deferred list-change notifications emitted before they subscribed; coalesced runtime changes are preserved.

    4.0.3release notes

  • Subsequent delta histogram exports omit min and max because cumulative extrema do not describe the reported interval.

    4.0.3release notes

  • 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.

    4.0.3release notes

  • The duplicate Anthropic response options for cache creation and cache reads are removed.

    4.0.2release notes

  • Config parsing preserves provider defects and interruption reasons, and Config.orElse no longer recovers mixed causes.

    4.0.2release notes

  • AI tracing renames the concurrency span attribute to effect.ai.concurrency.

    4.0.2release notes

  • AI tracing renames the object-name attribute, and object choices are JSON-encoded.

    4.0.2release notes

  • AI tracing renames the tool-choice attribute; it records the resolved value and defaults to auto.

    4.0.2release notes

  • Failures containing defects or interruptions are no longer retried.

    4.0.2release notes

  • Response encoding failures now return 500 and reach ErrorReporter; request decoding failures remain 400 and unreported, and response failures remain HttpApiSchemaError values.

    4.0.2release notes

  • Interrupt-only spans are Unset with effect.fiber.interrupted: true rather than Ok with an Interrupted description and legacy attributes.

    4.0.2release notes

  • Missing required session headers and initialize requests carrying a session header now return JSON-RPC error bodies.

    4.0.2release notes

  • OpenAI service-tier and system-fingerprint tracing attributes move from gen_ai.openai.* to openai.*.

    4.0.2release notes

  • 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.

    4.0.2release notes

  • 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.

    4.0.2release notes

  • AI tracing replaces the system option and gen_ai.system with provider: { name } and gen_ai.provider.name; related attribute types are renamed.

    4.0.2release notes

  • NaN and fractional capacities are rejected to prevent nonterminating batch publication; Infinity remains supported.

    4.0.2release notes

  • The OpenAI response-format telemetry option and WellKnownResponseFormat are removed.

    4.0.2release notes

  • The data-last overload now returns the handler's error type instead of the original error type.

    4.0.2release notes

  • The AI tracing token option, token attribute types, and gen_ai.token.type span attribute are removed.

    4.0.2release notes

  • Suspended workflows are no longer replayed for unawaited deferred checkpoints, while interrupt wakes are preserved.

    4.0.1release notes

  • 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.

    4.0.1release notes

  • Replaces FiberRef.

    4.0.0release notes

  • 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.

    4.0.0release notes

  • Requires React 19.

    4.0.0release notes

  • Requires Deno 2.8.3 or newer.

    4.0.0release notes

  • Uses a built-in PostgreSQL client with pipelining, prepared statements, and binary codecs, and no longer depends on pg.

    4.0.0release notes

  • Uses Node's built-in node:sqlite and requires Node 22.16 or newer.

    4.0.0release notes

  • Runs property tests with the native Arbitrary module and supports Vitest fixtures.

    4.0.0release notes

  • Now returns successes before failures; swap tuple order from the previous [failures, successes] order.

    4.0.0release notes

  • Array, Chunk, Effect, and Record partition functions now return successes before failures; swap tuple order from the previous [failures, successes] order.

    4.0.0release notes

  • Now holds Queue.Taker entries; resume an entry with entry.resume(...) instead of calling it as a function.

    4.0.0release notes

  • Remains suspended until its requested batch is available instead of entering a synchronous retry loop that can starve the host.

    4.0.0release notes

  • In-flight RPC calls fail when a socket misses a pong, even with transient connection retries enabled; missed pongs no longer invoke onTransientError.

    4.0.0release notes

  • Schema v4 is a new implementation with faster parsing, class-based schemas, make constructors on every schema, and effectful decoding with services.

    4.0.0release notes

  • 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.

    4.0.0release notes

  • 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.

    4.0.0release notes

  • 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.

    4.0.0release notes

  • Array, Chunk, Effect, and Record separate helpers now return successes before failures; swap tuple order from the previous [failures, successes] order.

    4.0.0release notes

  • TypeScript 5.9 or newer is required; TypeScript 7 is recommended.

    4.0.0release notes

  • Replaces verifyLosslessTransformation; existing callers must update to the new name.

    4.0.0release notes

  • @effect/vitest and @effect/doctest require Vitest 5.

    4.0.0release notes

Security 4

  • Sensitive query values and URL credentials are redacted in spans, request inspection, and errors without changing URLs sent over the wire.

    4.0.5release notes

  • Adds middleware that decompresses gzip and deflate request bodies, limits decompressed size, and rejects other codings with 415.

    4.0.5release notes

  • 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.

    4.0.3release notes

  • Fixes decoding of B3 debug and legacy sampling values and rejects all-zero W3C trace and parent IDs.

    4.0.1release notes

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.

    4.0.5release notes

  • Adds GNU-style flags with optional values: a bare flag uses the given value, while an explicit value must be attached with =.

    4.0.5release notes

  • Supports per-request URLs supplied as a function of context and operation or as an Effect<string>; GraphQLResolver batches lookups by URL.

    4.0.5release notes

  • Adds gzip and deflate request body compression.

    4.0.5release notes

  • Supports per-request URLs supplied as a function of context and operation or as an Effect<string>; GraphQLResolver batches lookups by URL.

    4.0.5release notes

  • Enables opt-in gzip compression for built-in OTLP JSON and protobuf exporters.

    4.0.5release notes

  • Built-in OTLP JSON and protobuf exporters support opt-in gzip compression through the compression option or OTLP compression environment variables; defaults remain uncompressed.

    4.0.5release notes

  • Resolves a relative path beneath a root and returns Option.none() for traversal escapes and rooted inputs using platform path rules.

    4.0.5release notes

  • Adds an API for checking whether a URL parameter name is redacted.

    4.0.5release notes

  • Adds an API for explicitly redacting URL parameters.

    4.0.5release notes

  • Adds an API for explicitly redacting URLs.

    4.0.5release notes

  • Adds an SSE decode option that dispatches named events with no data line, supporting protocols such as graphql-sse.

    4.0.4release notes

  • Adds experimental GraphQL support with typed operations, middleware, HTTP and subscription transports, partial results, serializable errors, and cursor pagination.

    4.0.4release notes

  • Adds a hosts file parsing utility.

    4.0.4release notes

  • Adds a host conversion utility.

    4.0.4release notes

  • Adds a host conversion utility.

    4.0.4release notes

  • Allows configuring Scalar's preferred authentication security scheme without a TypeScript cast.

    4.0.4release notes

  • 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.

    4.0.4release notes

  • Adds loopback address support.

    4.0.4release notes

  • TLS socket upgrades accept an explicit client servername without changing hostname behavior when it is omitted.

    4.0.4release notes

  • 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.

    4.0.4release notes

  • Exported terminal-cell width measurement using the same logic as built-in CLI help and tables.

    4.0.3release notes

  • Separate migration and storage layers allow applications to use tables migrated by an owner connection.

    4.0.3release notes

  • 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.

    4.0.3release notes

  • Adds PowerShell CLI completions using powershell or its pwsh alias.

    4.0.3release notes

  • Now accepts an optional format option; the default is a lowercase hyphenated UUID string, while bytes returns a 16-byte Uint8Array.

    4.0.3release notes

  • Now accepts an optional format option; the default is a lowercase hyphenated UUID string, while bytes returns a 16-byte Uint8Array.

    4.0.3release notes

  • Adds UDP support on Node, Bun, and Deno.

    4.0.3release notes

  • Added a constructor for DNS name server inputs.

    4.0.3release notes

  • Accepts address inputs; platform DNS services also accept name server inputs, and Dns.nameServerFromInput is added.

    4.0.3release notes

  • 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.

    4.0.3release notes

  • Adds fromInput constructors to the effect/net data types.

    4.0.3release notes

  • 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.

    4.0.3release notes

  • Accepts a position option for concurrent reads that leave the cursor unchanged.

    4.0.3release notes

  • Accepts a position option for concurrent reads that leave the cursor unchanged.

    4.0.3release notes

  • 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.

    4.0.3release notes

  • Setting allowSubscriptions to false disables v2026_07_28 subscriptions while keeping request-scoped progress and log notifications.

    4.0.3release notes

  • Adds conversion for runtime-reported addresses.

    4.0.3release notes

  • The delay option postpones an element's first delivery in the memory, Redis, and SQL stores.

    4.0.3release notes

  • 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.

    4.0.3release notes

  • 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.

    4.0.3release notes

  • Exports exact JSON Schema integers bounded by JavaScript's safe integer limits; composed bounds retain tighter constraints and exact integer branches preserve oneOf.

    4.0.3release notes

  • Adds stderr terminal detection with an overridable false default and runtime detection for Node.js, Bun, and Deno.

    4.0.3release notes

  • Provides deterministic random operations derived from a seed while preserving a platform crypto service's digest implementation.

    4.0.3release notes

  • 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.

    4.0.3release notes

  • This opt-in option for McpServer.layerHttp lets DELETE end a session and interrupt active requests; later requests with that session id return 404.

    4.0.2release notes

  • More atom registry APIs are exposed.

    4.0.2release notes

  • DecisionModel.decide accepts image input; providers opt in with supportsImages: true and receive images through ProviderOptions.images.

    4.0.2release notes

  • Anthropic input-token usage now includes cached tokens, with cache reads and writes reported in separate usage attributes.

    4.0.2release notes

  • Completion-handler services, including optional handlers, are included in the requirements.

    4.0.2release notes

  • RPC socket clients gain a configurable ping interval; the default remains five seconds and any decoded server frame counts as liveness.

    4.0.2release notes

  • RPC socket clients gain a configurable ping timeout; the default remains five seconds.

    4.0.2release notes

  • Image input is passed to supporting providers through this option; unsupported models reject nonempty image input.

    4.0.2release notes

  • Schemas returned by this API expose the selected tag property key through tag.

    4.0.2release notes

  • Schemas returned by this API expose the selected tag property key through tag.

    4.0.2release notes

  • SQL statement span-naming rules are exported through Statement.spanName and Statement.spanTarget.

    4.0.2release notes

  • SQL statement span-target rules are exported through this API.

    4.0.2release notes

  • Providers can opt in to image input by setting supportsImages: true.

    4.0.2release notes

  • Types now accept callbacks that select a TTL from the computation's Exit, including piped calls.

    4.0.1release notes

  • Adds an optional capability query for support of system messages in conversation history, with scoped overrides; Anthropic system instructions are preserved.

    4.0.1release notes

  • A new module is available.

    4.0.0release notes

  • Services are now defined with Context.Service.

    4.0.0release notes

  • A new module is available; Node, Bun, Deno, and browser packages provide the platform Crypto service.

    4.0.0release notes

  • A durable queue is available.

    4.0.0release notes

  • Adds EmbeddingModel, the DecisionModel classification and rating API, dynamic tools, and tool approvals.

    4.0.0release notes

  • Models network addresses.

    4.0.0release notes

  • Adds full Deno support.

    4.0.0release notes

  • Adds SSR hydration, stale-while-revalidate atoms, and serializable RPC and HttpApi queries.

    4.0.0release notes

  • Software transactional memory is built into Effect.tx, with TxRef and related transactional data types.

    4.0.0release notes

  • A new module is available.

    4.0.0release notes

  • HTTP modules add graceful server shutdown.

    4.0.0release notes

  • Supports typed response headers, streaming and SSE responses, and the HTTP QUERY method.

    4.0.0release notes

  • Adds in-memory testing for HttpApi.

    4.0.0release notes

  • The browser package adds IndexedDB support.

    4.0.0release notes

  • A new module is available.

    4.0.0release notes

  • A new module is available.

    4.0.0release notes

  • Supports protocol versions 2024-11-05 through 2026-07-28, including elicitation, sampling with tools, resource subscriptions, and typed tool output.

    4.0.0release notes

  • A new module is available.

    4.0.0release notes

  • Can be configured with standard OpenTelemetry environment variables.

    4.0.0release notes

  • HTTP modules add rate-limited clients.

    4.0.0release notes

  • HTTP modules add response compression.

    4.0.0release notes

  • Provides a compact binary codec and is the default wire format for cluster transports.

    4.0.0release notes

  • Powers JSON Schema import and export, TypeScript code generation, and AI structured output.

    4.0.0release notes

  • A new module is available.

    4.0.0release notes

  • Runner memory can be bounded with ShardingConfig limits.

    4.0.0release notes

  • Exposes structured reasons such as UniqueViolation.

    4.0.0release notes

  • HTTP modules add static file serving.

    4.0.0release notes

  • 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.

    4.0.0release notes

  • Workflows can be declared with class syntax.

    4.0.0release notes

  • An in-memory workflow engine is available.

    4.0.0release notes

Performance 9

  • Caches the last response decoder for each response kind, keyed by validation mode and ordered tool schema identities.

    4.0.5release notes

  • Reduces statement overhead by borrowing the shared connection while preserving semaphore exclusion and failed-COMMIT recovery.

    4.0.5release notes

  • Optimized for picking zero or one service.

    4.0.4release notes

  • Fixes quadratic parsing time for long lines split across many chunks.

    4.0.4release notes

  • Fixes quadratic parsing time for long lines split across many chunks.

    4.0.4release notes

  • The Kubernetes service-account token is cached for one minute so rotated credentials are picked up without reading the token file on every request.

    4.0.2release notes

  • Caches per-tool response schemas and parameter-mode copies to reduce schema construction.

    4.0.1release notes

  • 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.

    4.0.0release notes

  • Resolves candidate parsers once per union instead of on every decode, reducing allocations and improving decoding and encoding speed.

    4.0.0release notes

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.

    4.0.5release notes

  • Stores attempt metadata; yield it inside a transaction body to read attempt, retryReason, and schedule-like timing fields.

    4.0.5release notes

  • Colliding numeric, length, item-count, and property-count bounds are tightened in place rather than moved into allOf; redundant same-side bounds are dropped.

    4.0.4release notes

  • 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.

    4.0.4release notes

  • The passed effect counts as in-flight work, so a parked sibling no longer suspends the run while it executes.

    4.0.3release notes

  • Interrupted server-to-client requests now send MCP cancellation notifications instead of internal RPC control messages.

    4.0.3release notes

  • CLI prompts and the command wizard respect NO_COLOR by suppressing color and style escapes while preserving cursor and redraw controls.

    4.0.3release notes

  • JSON logs and Node inspection serialize SchemaError as a compact object with its tag and formatted message instead of schema AST nodes.

    4.0.3release notes

  • 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.

    4.0.3release notes

  • Input is acquired only when a prompt needs it, leaving piped stdin untouched for constant fallback prompts.

    4.0.3release notes

  • The result type now includes runtime layer errors.

    4.0.2release notes

  • For non-object failures, the internal stack frame is no longer captured; the stack contains the message and span frame when available.

    4.0.2release notes

  • Batches of at least two statements are named BATCH or BATCH {target}, with db.operation.name set to BATCH and db.operation.batch.size recorded.

    4.0.2release notes

  • HTTP tracing, logs, traces, and resources are aligned with OpenTelemetry conventions; homogeneous primitive arrays export as array attributes.

    4.0.2release notes

  • SQL tracing records Effect execution methods here instead of in db.operation.name.

    4.0.2release notes

  • HTTP tracing aligns span names, response error status, server addresses, and ports with OpenTelemetry conventions; header capture is opt-in.

    4.0.2release notes

  • LanguageModel spans are client spans and record gen_ai.output.type as text or json for every provider.

    4.0.2release notes

  • Default span names are now RPC methods, such as Echo.Ping rather than RpcClient.Echo.Ping; set spanPrefix to retain the old names.

    4.0.2release notes

  • Client and server spans set their respective span kinds and record rpc.system.name as effect_rpc and the rpc.method attribute; user spanAttributes still override these.

    4.0.2release notes

  • Modules and directly importable exports receive explicit stability tags; stable follows strict semver and unstable may break in minor releases.

    4.0.2release notes

  • Helpers now allow interruption while waiting for locks, while preserving automatic release after acquisition.

    4.0.2release notes

  • Helpers now allow interruption while waiting for permits, while preserving automatic release after acquisition.

    4.0.2release notes

  • Schedules pause while aggregation is idle; when a schedule ends, the current aggregation is emitted and sink leftovers are drained without further upstream pulls.

    4.0.1release notes

  • Separates wall-clock time from monotonic time.

    4.0.0release notes

  • Effect 4.0 is the first stable release of v4, replacing the beta and release-candidate series.

    4.0.0release notes

  • Aligns logs and spans with the OpenTelemetry specification.

    4.0.0release notes

  • Becomes schema-aware and supports server-originated requests and notifications.

    4.0.0release notes

  • Has a pull-based reader with backpressure and STARTTLS support.

    4.0.0release notes

Tooling 2

  • Becomes a native property-based testing module and no longer depends on fast-check.

    4.0.0release notes

  • Adds global flags, command aliases and examples, an interactive wizard mode, and Bash, Zsh, and Fish shell completions.

    4.0.0release notes

Fixes and other changes 155

  • When the input is a mutable array, the onNonEmpty callback receives a NonEmptyArray.

    4.0.5release notes

  • Failures now carry the combined record or tuple as previousSuccess instead of a single input's value.

    4.0.5release notes

  • Late reads of uninitialized dependencies no longer cause infinite atom rebuilds.

    4.0.5release notes

  • Deferred callback wakes are no longer lost when an activity suspends while a parallel activity is running.

    4.0.5release notes

  • Expanded values are no longer rescanned; self and circular references do not overflow, escaped references stay literal, and defaults apply to empty expansions.

    4.0.5release notes

  • Expanded values are no longer rescanned; self and circular references do not overflow, escaped references stay literal, and defaults apply to empty expansions.

    4.0.5release notes

  • Conversions handle very large millisecond values without throwing, compare equal to nanosecond equivalents, and preserve nanosecond precision for large integer millisecond values.

    4.0.5release notes

  • Waits for filesystem watcher installation and all GraphQL watch subscriptions, including nested directories, before generating so startup edits are not missed.

    4.0.5release notes

  • Accepts Redacted values as URL parameters.

    4.0.5release notes

  • Handler-local request.url is corrected for parameterized and percent-encoded prefixes, respecting duplicate-slash configuration.

    4.0.5release notes

  • Interruptions no longer call Math.random and hashing defects, preventing deterministic hosts that forbid randomness from looping forever or overflowing the stack.

    4.0.5release notes

  • Tool approvals are collected once per request instead of twice.

    4.0.5release notes

  • 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.

    4.0.5release notes

  • Array and variadic tuple patterns narrow only the matched prefix, leaving remaining elements with their original type.

    4.0.5release notes

  • Preserves completion-handler service requirements in URI templates when handlers take a context argument.

    4.0.5release notes

  • Preserves completion-handler service requirements in URI templates when handlers take a context argument.

    4.0.5release notes

  • Healthy connections are no longer closed before a ping when its tick runs late; slow requests stay connected while the server responds.

    4.0.5release notes

  • Decoding stays synchronous when a decoding default is an already-successful effect such as Effect.succeed(...).

    4.0.5release notes

  • 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.

    4.0.5release notes

  • No longer hangs when an async iterator's pending next() never settles.

    4.0.5release notes

  • No longer hangs when an async iterator's pending next() never settles.

    4.0.5release notes

  • Does not call a custom transform for input without words, such as an empty string or ---.

    4.0.5release notes

  • No longer throws on trailing underscores or even-length underscore runs; trailing underscores are dropped and even-length runs return an empty string.

    4.0.5release notes

  • No longer throws on trailing underscores or even-length underscore runs; trailing underscores are dropped and even-length runs return an empty string.

    4.0.5release notes

  • Interrupted sleeps are removed and new sleeps are inserted in order instead of re-sorting the queue.

    4.0.5release notes

  • No longer skips sleeps registered by a woken fiber after more than one scheduler hop.

    4.0.5release notes

  • No longer skips sleeps registered by a woken fiber after more than one scheduler hop.

    4.0.5release notes

  • 64-bit trace IDs are padded to 128 bits in OTLP exports and traceparent headers.

    4.0.5release notes

  • Accepts Redacted values as URL parameters.

    4.0.5release notes

  • Outgoing cluster messages are persisted while the locally assigned shard is waiting for its lock.

    4.0.4release notes

  • Fixes startup accessing storage-loop state before initialization, avoiding a scheduler-dependent ReferenceError and delayed initial storage reads.

    4.0.4release notes

  • Zoned additions apply hours, minutes, seconds, and milliseconds as elapsed time across DST transitions.

    4.0.4release notes

  • Zoned subtractions apply hours, minutes, seconds, and milliseconds as elapsed time across DST transitions.

    4.0.4release notes

  • Releases durable waits from losing branches when the race settles, so late completions no longer preempt and replay the continuing workflow.

    4.0.4release notes

  • Generated clients use decoded response aliases and render bare numbers with a standard leading finite check as Schema.Finite, preserving annotations and other checks.

    4.0.4release notes

  • Honors the Retry-After response header when retrying transient failures.

    4.0.4release notes

  • Correctly reads a Retry-After HTTP date instead of treating it as a number of seconds.

    4.0.4release notes

  • 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.

    4.0.4release notes

  • Merges outer headers and cookies into a copy of a raw Response, leaving original headers unchanged and preventing cookies from accumulating across reused responses.

    4.0.4release notes

  • Fixes persistence failures for uploads named . or .. and for long multi-byte file names.

    4.0.4release notes

  • Keeps streamed text and reasoning in stream order and preserves partial text from unended text blocks.

    4.0.4release notes

  • Grouped resolvers no longer retain batch keys for their lifetime; keys are dropped when their batch stops pending, including after interruption.

    4.0.4release notes

  • Stops at the matching element and returns the remaining input as leftovers instead of dropping the element after a match.

    4.0.4release notes

  • Stops at the matching element and returns the remaining input as leftovers instead of dropping the element after a match.

    4.0.4release notes

  • Orphaned activity requests now receive Suspended instead of waiting indefinitely for replay registration.

    4.0.3release notes

  • Persisted requests deliver terminal replies only after commit or clean rollback; on transaction failure, they recover a committed reply or retry the request.

    4.0.3release notes

  • Workflow branches continue after recording a result instead of stalling until a concurrently parked sibling is woken.

    4.0.3release notes

  • Returns Some for infinite nanosecond totals instead of None.

    4.0.3release notes

  • Infinite nanosecond totals now return an infinite duration instead of throwing.

    4.0.3release notes

  • Multiplying a nanosecond-backed duration by fractional or non-finite numbers no longer throws; fractional results round to the nearest nanosecond.

    4.0.3release notes

  • Synchronous re-entry no longer causes crashes or premature interruption in cached effects.

    4.0.3release notes

  • Request-path normalization now preserves duplicate slashes in query values.

    4.0.3release notes

  • OTLP exporters retain all finite boundaries and overflow observations; Prometheus emits a single +Inf bucket.

    4.0.3release notes

  • Waits for the reported reset once a response's remaining budget is exhausted, including when a limit header is also present.

    4.0.3release notes

  • Interrupted activities can run again when replaying a preempted execution.

    4.0.3release notes

  • Cancellation that withholds every reply returns an empty 200 text/event-stream response; other request POSTs ending without a response return 500.

    4.0.3release notes

  • WithTransaction RPCs save typed failures and non-fatal defects after rollback so retries receive the stored reply; successful replies still commit with handler writes.

    4.0.3release notes

  • Encoding failures are reported to ErrorReporter, and client defects include the RPC tag.

    4.0.3release notes

  • When response encoding fails, the span ends with the encoding defect instead of recording a client interruption.

    4.0.3release notes

  • Exports exact JSON Schema integers bounded by JavaScript's safe integer limits; composed bounds retain tighter constraints and exact integer branches preserve oneOf.

    4.0.3release notes

  • 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.

    4.0.3release notes

  • Property checks, schema generation, and shrinking now propagate defects and interruptions accompanying typed failures, while removing typed failures from mixed causes.

    4.0.2release notes

  • The data-last overload now correctly infers a changed success type.

    4.0.2release notes

  • This API no longer throws when window is undefined.

    4.0.2release notes

  • Writing search parameters now preserves the URL hash and omits empty query strings.

    4.0.2release notes

  • This API no longer throws when window is undefined.

    4.0.2release notes

  • Result types are corrected for union response modes while omitted mode continues to produce decoded-only results.

    4.0.2release notes

  • An interruption race no longer leaves an abandoned lookup running or its key stuck in the cache.

    4.0.2release notes

  • Resources are no longer leaked when interrupted during acquisition.

    4.0.2release notes

  • Options are derived from the TextDecoder constructor so declarations work with Node-only types without requiring the DOM library.

    4.0.2release notes

  • Concurrent flatMap no longer drops inner scope finalizer defects; usage and release failures are both preserved.

    4.0.2release notes

  • The data-last overload now preserves channel requirements and adds the mapping function's requirements.

    4.0.2release notes

  • A side finalizer failure no longer causes merge to hang or succeed; usage and finalizer failures are both preserved.

    4.0.2release notes

  • Inner scope finalizer defects are no longer dropped; usage and release failures are both preserved.

    4.0.2release notes

  • The returned Effect now includes the channel's error type.

    4.0.2release notes

  • Record values now preserve separators, including base64 padding in OTLP headers.

    4.0.2release notes

  • Repeated DST intervals no longer produce past occurrences or exhaust the search limit.

    4.0.2release notes

  • Throwing error mappers become defects instead of escaping asynchronous callbacks and leaving fibers suspended.

    4.0.2release notes

  • Finalizer defects are preserved.

    4.0.2release notes

  • Finalizer defects are preserved.

    4.0.2release notes

  • Fallback steps preserve errors and service requirements from layers, predicates, and schedules; captured services are provided to schedules.

    4.0.2release notes

  • Redaction handles getter-returned values with toJSON without invoking getters twice.

    4.0.2release notes

  • Single-value array fields are now accepted in form-urlencoded and GET payloads.

    4.0.2release notes

  • Result types are corrected for union response modes while omitted mode continues to produce decoded-only results.

    4.0.2release notes

  • Unread responses are no longer retained on runtimes without FinalizationRegistry, such as Hermes.

    4.0.2release notes

  • Cookies can now be read on platforms whose Headers lacks getSetCookie, such as React Native.

    4.0.2release notes

  • For successful WebSocket upgrades, server middleware now receives status 101 rather than the discarded handler response status.

    4.0.2release notes

  • Server spans are marked failed for 5xx responses, including rendered errors, without changing the application exit or existing span failure causes.

    4.0.2release notes

  • The serve service now infers required services from the middleware-transformed app.

    4.0.2release notes

  • Retries defer each build until execution instead of returning an already-finalized resource.

    4.0.2release notes

  • retryPolicy is now forwarded through this layer.

    4.0.2release notes

  • Shutdown finishes in-flight output before flushing remaining entries, without overlapping flushes.

    4.0.2release notes

  • Disposal no longer deadlocks when called from one of the runtime's own fibers, including child fibers.

    4.0.2release notes

  • McpServer.layerHttp uses the negotiated protocol version when a session request omits this header; invalid or mismatched protocol requests return JSON-RPC error bodies.

    4.0.2release notes

  • Completion-handler services, including optional handlers, are included in the requirements.

    4.0.2release notes

  • Queue.clear no longer swallows failures combined with Cause.Done.

    4.0.2release notes

  • Interrupted queue operations at a scheduler yield no longer lose messages.

    4.0.2release notes

  • Many equal requests sharing a pending cache entry no longer cause a stack overflow.

    4.0.2release notes

  • Successful pipeline results are returned instead of failing with a channel completion signal.

    4.0.2release notes

  • Passing spanPrefix: "RpcClient" or spanPrefix: "RpcServer" retains the former default RPC span names.

    4.0.2release notes

  • The sink's unconsumed elements are no longer dropped from a partially consumed chunk.

    4.0.2release notes

  • Overlapping windows no longer drop elements from the final partial window.

    4.0.2release notes

  • Sink failures after end-of-stream are no longer swallowed, and the stream no longer hangs when the sink finishes during an upstream pull.

    4.0.2release notes

  • The stream no longer hangs when an input completes without emitting.

    4.0.2release notes

  • Immediate opening CRLF is trimmed in basic and literal multiline strings, matching existing LF handling.

    4.0.2release notes

  • One-shot iterable inputs are preserved across transaction retries.

    4.0.2release notes

  • Block scalar chomping preserves trailing line breaks with keep indicators and avoids adding line breaks to empty or unterminated scalars.

    4.0.2release notes

  • A fiber's context is preserved when another fiber wakes or interrupts it; Effect.tryPromise error handlers run in the resumed fiber's context.

    4.0.1release notes

  • Recovery replays unfinished requests without duplicating requests awaiting first dispatch; shutdown interrupts waiters, and superseded rebuilds cannot publish stale handlers or SQL lock connections.

    4.0.1release notes

  • Reset rows are locked in message order to prevent PostgreSQL deadlocks between message claims and shard or address resets.

    4.0.1release notes

  • Entity registration is prevented if shard ownership is lost during construction, and pending requests retry on the new owner.

    4.0.1release notes

  • Returns consistent shard assignments for the same nodes and weights regardless of add/remove history; fractional weights or hash ties may have different assignments.

    4.0.1release notes

  • 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.

    4.0.1release notes

  • Invalid requests no longer report schema errors as server failures.

    4.0.1release notes

  • 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.

    4.0.1release notes

  • Optional MCP fields whose schemas decode to classes now encode correctly.

    4.0.1release notes

  • Valid expressions whose RegExp source is canonicalized are imported correctly, including slashes, empty patterns, and literal line terminators.

    4.0.1release notes

  • Idle subscriptions stay open on Cloudflare Workers by using SSE keepalives.

    4.0.1release notes

  • Usage TTL now expires only idle, unreserved excess items, oldest idle first; idle time is measured from the last release.

    4.0.1release notes

  • Shutdown drains responses after stdin reaches EOF.

    4.0.1release notes

  • Stream interruption no longer leaves chunk delivery blocked on a full buffer and stalling the shared protocol receive loop.

    4.0.1release notes

  • Only requests pending when an error broadcast begins receive that error; requests started synchronously by error handlers remain pending for their own responses.

    4.0.1release notes

  • Entry expiry is set before lookup waiters wake, preventing reuse of a zero-TTL result.

    4.0.1release notes

  • Refreshes no longer release shards acquired while the refresh is in flight.

    4.0.1release notes

  • Reassignment no longer durably cancels outstanding RPC requests.

    4.0.1release notes

  • Preserves server and client extension capabilities.

    4.0.1release notes

  • Emits its initial state for empty streams.

    4.0.1release notes

  • The shape strategy retains token debt after early wake-ups and uses monotonic time so wall-clock changes do not affect throttling.

    4.0.1release notes

  • Decode failures stay local to the affected request and interrupt it on the server, without disconnecting unrelated requests.

    4.0.1release notes

  • Pending interruptions are preserved when an uninterruptible effect fails; typed failures are dropped when interruption skips recovery handlers, while defects remain.

    4.0.1release notes

  • Preserves milliseconds for pre-epoch timestamps on runtimes that omit Intl fractional seconds.

    4.0.1release notes

  • A stale finalizer no longer evicts a newer cached atom.

    4.0.0release notes

  • Concurrent calls no longer lose synchronous successes or failures.

    4.0.0release notes

  • Union-of-tag inference now reflects the selected RPC payloads and results instead of resolving to never.

    4.0.0release notes

  • Union-of-tag inference now reflects the selected RPC payloads and results instead of resolving to never.

    4.0.0release notes

  • Cause has a flat structure.

    4.0.0release notes

  • Custom message storage implementations must honor the optional expected reply ID to prevent stale concurrent workflow resumes from clearing a newer completed reply.

    4.0.0release notes

  • All Effect packages share one version number and are released together; use the same version of effect and every @effect/* package.

    4.0.0release notes

  • Preserves sibling and callback cleanup failures alongside interruption in concurrent execution, including shared Layer.build.

    4.0.0release notes

  • Preserves sibling and callback cleanup failures alongside interruption in concurrent execution.

    4.0.0release notes

  • Interrupts losing effects when the race settles or is interrupted while other effects are still starting.

    4.0.0release notes

  • Interrupts losing effects when the race settles or is interrupted while other effects are still starting.

    4.0.0release notes

  • Interrupts losing effects when the race settles or is interrupted while other effects are still starting.

    4.0.0release notes

  • Interrupts losing effects when the race settles or is interrupted while other effects are still starting.

    4.0.0release notes

  • The effect package has no runtime dependencies.

    4.0.0release notes

  • Union-of-tag inference now reflects the selected RPC payloads and results instead of resolving to never.

    4.0.0release notes

  • Retain the handler's failure exit through response handling and middleware.

    4.0.0release notes

  • No longer retains previously used equal object keys after replacement or removal, including when Cache and ScopedCache refresh entries on hits.

    4.0.0release notes

  • The interrupt fiberId type admits null emitted by JSON encoding; consumers should handle null alongside undefined.

    4.0.0release notes

  • Decoded and encoded schema representations no longer contain duplicate references when schemas are reused through optional or mutable keys.

    4.0.0release notes

  • No longer loses parent checks when projecting checked children without transformations; suspended children remain opaque and structural checks are preserved.

    4.0.0release notes

  • No longer loses parent checks when projecting checked children without transformations; suspended children remain opaque and structural checks are preserved.

    4.0.0release notes

  • Preserves the grouping of branded union types in generated TypeScript code.

    4.0.0release notes

  • Server WebSockets close with 1000 on success, 1001 on interruption, or 1011 on failure, while preserving explicit close codes.

    4.0.0release notes

  • Failed workflow runs retry resets instead of acknowledging deferred completion before the run resumes.

    4.0.0release notes

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.

    3.22.3release notes

  • 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.

    3.21.5release notes

Security 1

  • Effect AsyncLocalStorage context lost/contaminated inside Effect fibers under concurrent load with RPC

    3.20.0security advisory

Deprecations 1

New APIs and options 13

  • Adds Graph.successors for querying graph successors.

    3.22.0release notes

  • Adds Cron.prev and reverse iteration support, aligning next/prev lookup tables and fixing DST handling symmetry.

    3.21.0release notes

  • Adds Effect.currentPropagatedSpan.

    3.21.0release notes

  • Adds type-level utilities for asserting layer types.

    3.21.0release notes

  • Types.VoidIfEmpty is backported to 3.x.

    3.20.0release notes

  • Adds the typeConstructor annotation for Schema.

    3.19.13release notes

  • Introduces JsonValue and uses it in JsonSchemaAnnotations to improve type safety for schema examples and defaults.

    3.19.11release notes

  • Adds options for selecting the target JSON Schema version in the make function.

    3.19.11release notes

  • Adds the RcRef.invalidate API.

    3.19.6release notes

  • Adds an experimental concurrency primitive that shares permits across keyed partitions and distributes waiting permits fairly using a round-robin strategy.

    3.19.4release notes

  • Adds Effect.fn.Return to allow typing returns on Effect.fn.

    3.19.0release notes

  • Adds an experimental HashRing module.

    3.19.0release notes

  • JSON Schema generation adds jsonSchema2020-12 as a target.

    3.18.5release notes

Performance 5

  • Uses a linear matcher when decoding template literals containing only string spans.

    3.22.1release notes

  • Prevents multiple iterations over the same Iterable.

    3.19.8release notes

  • Prevents multiple iterations over the same Iterable.

    3.19.8release notes

  • Backports an optimization to Effect.gen.

    3.19.5release notes

  • Merged layers can now be finalized in parallel.

    3.19.1release notes

Behavior and default changes 3

  • Fibers spawned by Effect.timeout no longer log unhandled errors.

    3.22.1release notes

  • The idleTimeToLive option can now be a function receiving the key and returning a duration, allowing different TTL values for different resources.

    3.21.0release notes

  • Builds synchronously when possible, so creating a ManagedRuntime may no longer require asynchronous execution.

    3.19.19release notes

Fixes and other changes 55

  • Prevents interrupted acquisition from causing an uninterrupted scope closure to fail.

    3.22.3release notes

  • Prevents interrupted acquisition from causing an uninterrupted scope closure to fail.

    3.22.3release notes

  • Fixes Reloadable.auto hanging when its scope closes.

    3.22.3release notes

  • Fixes the use of Schema.NonEmptyArrayEnsure with strings.

    3.22.2release notes

  • Fixes erroneous clearing of the entire bucket on hash collision.

    3.22.2release notes

  • Fixes erroneous clearing of the entire bucket on hash collision.

    3.22.2release notes

  • Avoids collisions between JSON key paths.

    3.22.1release notes

  • Fixes zero-capacity rendezvous behavior for take and takeN.

    3.22.1release notes

  • Fixes termination with bounded dropping and sliding buffers.

    3.22.1release notes

  • Errors from wrapped config parsers are redacted.

    3.22.1release notes

  • Fixes graph algorithm edge cases around reversal.

    3.22.0release notes

  • Fixes graph algorithm edge cases around shortest-path weight validation.

    3.22.0release notes

  • Fixes graph algorithm edge cases around strongly connected components.

    3.22.0release notes

  • Fixes graph algorithm edge cases around topological sort initials.

    3.22.0release notes

  • Fixes graph algorithm edge cases around undirected edge queries.

    3.22.0release notes

  • 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.

    3.21.5release notes

  • Cron fields like 5/15 now expand from the starting value through the field maximum.

    3.21.5release notes

  • Fixes behavior when the test clock is adjusted to infinity.

    3.21.5release notes

  • Graph traversal and shortest-path algorithms now traverse undirected edges independently of their stored source/target orientation.

    3.21.4release notes

  • Records with string keys and Schema.Never values now emit additionalProperties: false.

    3.21.3release notes

  • Fixes generic type parameter inference inside $match arms.

    3.21.3release notes

  • Fractional millisecond instants are floored before conversion to BigInt.

    3.21.2release notes

  • Batched request resolver defects no longer leave request Deferreds incomplete and consumer fibers hanging forever.

    3.21.1release notes

  • Fixes Effect.annotateCurrentSpan.

    3.21.0release notes

  • Logs are now added to the first propagated span in the described Effect.fn and withSpan case.

    3.21.0release notes

  • Fixes a crash when comparing null values inside structuralRegion by guarding Object.getPrototypeOf calls.

    3.20.1release notes

  • Avoids using a class for PrettyError so error.name is preserved.

    3.20.1release notes

  • getPropertySignatures no longer throws on structs containing optionalWith variants that produce Transformation nodes.

    3.20.0release notes

  • Scheduler task draining now isolates AsyncLocalStorage across fibers.

    3.20.0release notes

  • Schema.omit now handles structs combining optionalWith transformations and index signatures without returning the wrong AST result.

    3.20.0release notes

  • Post-rest validation now checks each tail index sequentially.

    3.20.0release notes

  • Fixes a race condition that could leak permits.

    3.19.19release notes

  • Stream.changes no longer writes empty chunks.

    3.19.18release notes

  • Correctly handles multi-byte UTF-8 characters split across chunk boundaries.

    3.19.17release notes

  • Handles null and undefined when matching nullable union types, preventing crashes.

    3.19.16release notes

  • Handles null and undefined when matching nullable union types, preventing crashes.

    3.19.16release notes

  • Fixes type inference loss for complex nested structures, including unions of Effects with contravariant requirements.

    3.19.15release notes

  • Fixes the Config.orElseIf signature.

    3.19.15release notes

  • Fixes plain object comparisons in structural mode.

    3.19.15release notes

  • Effect.retry now respects the times: 0 option by checking explicitly for undefined instead of using a truthy check.

    3.19.14release notes

  • Uses performance.now only when it is available, avoiding reliance on an unavailable API.

    3.19.12release notes

  • Filters invalid non-JSON values, including BigInt and cyclic references, to prevent infinite recursion on cycles.

    3.19.11release notes

  • Prevents crashes when Hash and Equal are used with an invalid Date object.

    3.19.10release notes

  • Fixes NoSuchElementException instantiation in fastPath.

    3.19.10release notes

  • The arbitrary generator for BigDecimal now allows negative scales.

    3.19.9release notes

  • Fixed the batch size behavior for SqlPersistedQueue.

    3.19.7release notes

  • Fixes DeepMutable mapping over functions.

    3.19.4release notes

  • Config error messages use the standard formatting function.

    3.19.3release notes

  • Ensures the state transition is atomic.

    3.19.2release notes

  • Preserves context order when merging layers.

    3.19.2release notes

  • Improves the Array.window signature.

    3.19.0release notes

  • Backports updates to the Graph module.

    3.19.0release notes

  • AsEffect is now computed.

    3.18.5release notes

  • For undirected graphs, returns the other endpoint instead of the queried node when queried from an edge's target side.

    3.18.5release notes

  • Fixes tuple output for JSON Schema 2019-09 and OpenAPI 3.1.

    3.18.5release notes