Yolk SDK

Migration and versioning

Canary stability, lockstep package versions, upgrade checks, and migration workflow.

Yolk packages are canary-stage. APIs can change between canary releases.

Version rule

Keep every public package on the same canary version:

pnpm add @yolk-sdk/agent@canary @yolk-sdk/mcp@canary @yolk-sdk/knowledge@canary @yolk-sdk/connectors@canary @yolk-sdk/sandbox@canary @yolk-sdk/vercel-workflows@canary @yolk-sdk/harness@canary @yolk-sdk/codemode@canary @yolk-sdk/extractors@canary @yolk-sdk/files@canary @yolk-sdk/pool@canary
pnpm add -D @yolk-sdk/conformance@canary @yolk-sdk/emulators@canary

Add only the packages you use. @yolk-sdk/harness is available from 0.1.0-canary.77. @yolk-sdk/codemode, @yolk-sdk/conformance, and @yolk-sdk/emulators are available from 0.1.0-canary.96. @yolk-sdk/extractors is available from 0.1.0-canary.98, @yolk-sdk/files from 0.1.0-canary.114, and @yolk-sdk/pool from 0.1.0-canary.116. Keep each of them on the same lockstep version as the other public packages.

Check installed versions:

pnpm list '@yolk-sdk/*'

Do not mix versions unless a release note explicitly says it is safe.

Recent canary migrations

Canary.178: Effect 4.2.0, effect as a peer

Canary.178 targets effect@4.2.0, and effect becomes a peer dependency. Upgrade the Yolk packages and Effect together, and move effect and the coordinated Effect runtime packages (@effect/platform-*, @effect/sql-*, @effect/opentelemetry, @effect/vitest) to 4.2.0 together. Yolk APIs are unchanged.

  • Every package declares effect as a peer with the range ~4.2.0 (tested on 4.2.0) instead of an exact dependency, so the host installs effect and every package shares that one copy. Effect patch releases satisfy the range; a new Effect minor needs a new Yolk canary, because Yolk calls Effect's unstable http, process, and socket modules. A host still on effect@4.1.7 gets an unmet peer: npm fails the install with ERESOLVE, and pnpm only warns (then runs Yolk against 4.1.7, which it does not support), so check pnpm install's peer warnings.
  • @yolk-sdk/mcp declares @effect/platform-node as an optional peer (~4.2.0). Only @yolk-sdk/mcp/client/node imports it: Node hosts that use it install @effect/platform-node at the same version as effect; other hosts need nothing.
  • @effect/platform-node 4.2.0 requires ws ^8.23.1. If another dependency keeps an older ws, the package manager can install @workflow/core twice, and a Workflow build fails with duplicate step ids. Dedupe ws, for example with a pnpm override ws: ^8.23.1.
  • Effect 4.2 has breaking changes of its own: a custom ChildProcessSpawner.makeHandle must provide exitStatus; Cookies.cookies is an array (read cookies with Cookies.get); HttpClient.withRateLimiter adds HttpClientError to the error type unless failsWith is set; FileSystem.glob takes one PathFilter.Input; Yaml.parse returns a Result and follows YAML 1.2; RpcServer.layerProtocolStdio is a function; a hand-built Pool.Stats needs acquiring, a hand-built Toolkit.HandlerContext needs modelOutput; and exhaustive SystemErrorTag handlers need DirectoryNotEmpty. Check the Effect 4.2.0 changelog for the APIs your code uses.
  • @effect/opentelemetry 4.2 is built on the OpenTelemetry SDK v3: install @opentelemetry/sdk-trace (its NodeSdk imports it), @opentelemetry/sdk-logs 3.x, and @opentelemetry/api 1.10 or later, and pass the exporter as an option: new BatchLogRecordProcessor({ exporter }).

Canary.163: model step execution ids under Workflow 5.8

Workflow 5.8's speculative execution can discard a step body's outcome and run the body again under the same getStepMetadata() stepId and attempt, possibly beside the first, for steps with maxRetries > 0. An executionId of ${stepId}:${attempt}, the example earlier docs gave, then repeats: both executions write the same event ids and clients splice their answers. Generate the id once at the start of the step body instead, for example ${stepId}:${attempt}:${crypto.randomUUID()}. TestWorkflowWorld's new discardStepExecution option reproduces this in tests (Speculative execution).

Canary.158: Fortnox bookkeeping actions

FortnoxConnector grows from 91 to 102 actions: financial years, accounts, voucher series, vouchers, voucher file connections, and SIE files. Hosts that expose every Fortnox action as agent tools gain these eleven tools, including the destructive fortnox.create_voucher (Fortnox books the voucher at once and its API documents no voucher delete or update): keep approval on destructive tools, or filter the actions you expose. The new bookkeeping scope (FortnoxBookkeepingOAuthCredentialSlot) stays outside FortnoxCombinedOAuthCredentialSlot; Fortnox grants a scope added to an app only after the user authorizes again, so existing connections must reconnect before these actions work. fortnox.get_sie_file also needs the host ConnectorBinaryHttpClient in the connector layer. See Bookkeeping.

Canary.152: lazy knowledge tokenizer

@yolk-sdk/knowledge/chunking no longer evaluates gpt-tokenizer (about 2 MB) on import: the default chunker loads it the first time text is chunked or counted. Imports of KnowledgeChunker, DefaultKnowledgeChunkerLive, makeDefaultKnowledgeChunker, and chunkKnowledgeText are unchanged and need no migration.

countKnowledgeChunkTokens(text) now returns Effect<number, KnowledgeChunkingError> instead of a number. Run it in your Effect (const tokens = yield* countKnowledgeChunkTokens(text)), or call gpt-tokenizer yourself where you need a synchronous count. chunkKnowledgeText and the default chunker can also fail with KnowledgeChunkingError (Failed to load the default tokenizer) when the tokenizer module cannot load.

makeDynamicWorkerCodeModeExecutor (@yolk-sdk/codemode/cloudflare) now loads Sucrase when the first script runs instead of on import; if Sucrase cannot load, the execution fails like a sandbox that cannot load (Could not load the script sandbox., onInternalError stage load).

Canary.150: pi code mode executor failure messages

makePiCodeModeExecutor (@yolk-sdk/codemode/node) now answers its own failures with fixed messages, as the Dynamic Worker executor does: a sandbox that cannot be created fails with Could not create the sandbox. (before: Could not create the sandbox: <error>), and a sandbox failure of pi's worker or QuickJS VM (Failed to load QuickJS: …, Failed to start worker: …, a worker crash or exit) with The script sandbox failed.. Script errors, timeouts, and aborts are unchanged. Code matching the old text needs the new messages; to log the original error, pass the new onInternalError option (both executors).

Canary.149: reasoning effort levels and OpenAI chat effort

AgentReasoningEffort adds none and max (none, minimal, low, medium, high, xhigh, max). Stored efforts keep decoding. Exhaustive matches or Records keyed by the type need the two new cases, and code passing an AgentReasoningEffort where a narrower host type is expected needs a guard. Data written with the new values does not decode on an earlier canary, so roll every reader forward first. Anthropic Messages (Claude, OpenCode Go messages) sends max and rejects none with a validation_error LLMError; the other providers pass both through.

makeOpenAiProviderLayer and OpenAiProviderLayer now send reasoningEffort as reasoning_effort on the native OpenAI endpoint (no chatCompletionsUrl, or https://api.openai.com/v1/chat/completions). Before, it was dropped unless reasoningEffortFormat was set. Models without reasoning reject the field: stop sending them an effort, or set reasoningEffortFormat: 'omit' (new), which never sends it and never fails. Move an extraBody.reasoning_effort workaround to the request's reasoningEffort (reasoning_effort is now a canonical key there and is dropped from extraBody). On any other chatCompletionsUrl, and in toOpenAiRequestBody without a format, a request with an effort now fails with a validation_error instead of being sent without it: set reasoningEffortFormat ('omit' included), or stop sending the effort. Vercel AI Gateway and OpenCode Go set their format already; the Gateway's reasoningEffortFormat also accepts 'omit'.

Canary.149: Dynamic Worker code mode CPU limit

makeDynamicWorkerCodeModeExecutor (@yolk-sdk/codemode/cloudflare) now loads every script with limits.cpuMs (new option cpuMs, default 500). A script that used more CPU time before now fails with a timeout (Execution exceeded its CPU limit of <cpuMs> ms): raise cpuMs if your scripts compute more. A tool or global call the script left pending is rejected when the execution ends, and calls arriving afterwards are rejected without running. Loader and isolate failures now carry fixed messages (Could not load the script sandbox., The script sandbox failed.) instead of the runtime's error text after The script sandbox failed: ; code matching that prefix needs the new messages. A custom WorkerLoader now receives limits in WorkerLoaderCode.

Canary.145: Cloudflare runtime hook token conflicts

The Cloudflare runtime (@yolk-sdk/vercel-workflows/cloudflare*) now refuses a hook whose token another live hook holds, in another run or the same one, as Vercel does. Before, the newest hook took the token and resumeHook reached it instead of the live holder. Now creating it succeeds, but awaiting it rejects with HookConflictError (token, conflictingRunId, exported from ./cloudflare), and the holder keeps the token. Disposing a hook (using or dispose()) now frees its token, and so does its run's end; an answered hook keeps its token until then. Give each pause its own token, or dispose the previous hook before the run waits again (a loop with using hook = createHook({ token }) per round keeps working). A second resumeHook to a live, answered hook now succeeds (the payload is dropped) instead of failing with HookNotFoundError. Hosts that drive WorkflowExecution themselves pass claimHook (returning a HookClaim) instead of registerHook; custom WorkflowRunStub namespaces implement hookClaim and hookHeld instead of hookRegister (Cloudflare runtime).

Runs in flight at the upgrade keep what the earlier build left. A run waiting on a token that the earlier build let a newer run take stays unreachable: the index names the newer run, and its resumeHook calls reach the newer run. Before upgrading, drain or cancel runs waiting on tokens that several runs share. Earlier builds also kept the token entry of a hook that was disposed but never answered. A run that replays after the upgrade (after an eviction, or on its next resumeHook) repairs both: disposing that hook again deletes its entry, and a hook that still has an entry asks the index for its token again (it is refused if another live hook holds it). A run that does not replay keeps that entry until it ends, and the token stays taken until then.

Canary.144: Cloudflare sandbox state

@yolk-sdk/sandbox adds a Cloudflare Containers adapter (Cloudflare Containers), and with it a second sandbox state:

  • SandboxState gains CloudflareSandboxState (_tag: 'Cloudflare', with bootId). Exhaustive matches over SandboxState need a Cloudflare case; a host state store that decodes stored state with the SandboxState schema accepts both.
  • SandboxProviderError.provider is 'vercel' | 'cloudflare'.
  • The sandbox tool's SandboxToolOutput.state is a union of the Vercel and Cloudflare shapes.
  • sandboxStateDecision takes an optional provider; the Vercel layer passes 'Vercel', so a stored Cloudflare state for the same session recreates (reason: 'provider_mismatch').

Canary.143: non-empty harness pause

Driver.pause and Inbox.park from @yolk-sdk/harness take a non-empty request id list (Array.NonEmptyReadonlyArray<string> from effect). An empty pause was Ready at once, so the drain kept its claim and nothing woke the run. StepOutcome.AwaitingInput requests and ParkedState.requestIds are non-empty too. Map a tool batch's requests with Effect's Array.map, which keeps the list non-empty (the native .map returns string[]). Fragment, inside a drain:

import { Array as Arr } from 'effect'

const requestIds = Arr.map(outcome.requests, request => request.requestId)
const decision = yield * inbox.park(runId, requestIds, context.drainToken)

Check a host-built list with Arr.isReadonlyArrayNonEmpty and do not pause when it is empty. Custom InboxApi / DriverApi implementations take the narrower parameter (Harness API).

Canary.143: test world hook token conflicts

TestWorkflowWorld now refuses a hook whose token another live hook holds, in another run or the same one, as Vercel does. Creating it succeeds, but awaiting it rejects with TestWorkflowHookConflictError (named HookConflictError, with token and conflictingRunId), and the holder keeps the token. Vercel decides the conflict at the run's next suspension and the world once the code that created the hook yields, so a disposal made before then frees the token for the new hook. Before, the world registered both. Update host tests in which two live runs, or two live hooks of one run, share a token: give each pause its own token, or let the holder dispose its hook or end its run first. TestWorkflowHookConflictError is no longer deprecated (Hooks).

Canary.141: idempotent stream close

TestWorkflowWorld now treats closing an already closed stream as Vercel does: the close succeeds (still counted in inspect(runId).streamCloseCount) instead of throwing the 409 TestWorkflowStreamConflictError. Writes after close still throw that conflict. Update host tests that expected a second close to throw.

runVercelAgentWorkflow now retries the close step by default: closeStreamRetry defaults to defaultCloseStreamRetry ({ maxAttempts: 3 }, any rejection, a FatalError too), so a close applied by an attempt that then failed completes the run when a later attempt succeeds. Keep closeStream close-only and safe to repeat, or opt out with closeStreamRetry: noWorkflowStepRetry. Tests that counted one closeStream call for a failing close now see up to three (Retry policy).

Canary.131: test world step errors

TestWorkflowWorld.runStep now treats step errors as the platform does: it stores each thrown value with the installed workflow runtime's serializer and throws only the value read back, never retries a FatalError, and wraps an exhausted step's error in the platform's FatalError (Step "<name>" failed after N retries: ..., with the error as cause). Update tests that compared a step error by identity or class: compare message, name and plain-data cause instead. Tests that execute steps must run in Vitest's Node environment. A step error the platform cannot store is listed in inspect(runId).unstorableStepErrors; assert it is empty (Step errors).

Providers also fail a malformed returned tool call (empty or padded id or name) as a typed invalid_response LLMError instead of a defect; hosts that caught that defect can drop the workaround.

Canary.126: typed tool results

A tool's typed output is now the single contract for code mode scripts, files are typed fields of that output, and script values never contain file labels (ADR 0013). makeTool tools that return a ToolResult keep working in this canary (deprecated), except for files: see the first bullet below before upgrading.

Convert a tool that returns [TextPart(JSON), FilePart]. Fragment: Params and exportInvoice are host-owned; ToolFile and FileBytes come from @yolk-sdk/agent/protocol.

// Before (deprecated)
makeTool({
  name: 'export_invoice',
  description: 'Export an invoice as JSON and its PDF.',
  parameters: Params,
  access: 'read',
  execute: ({ call, params }) =>
    exportInvoice(params.id).pipe(
      Effect.map(invoice =>
        ToolResult.make({
          toolCallId: call.id,
          content: [
            TextPart.make({ text: JSON.stringify({ number: invoice.number }) }),
            filePartFromBytes({
              bytes: invoice.pdf,
              mimeType: 'application/pdf',
              filename: 'invoice.pdf'
            })
          ]
        })
      )
    )
})

// After
makeTool({
  name: 'export_invoice',
  description: 'Export an invoice as JSON and its PDF.',
  parameters: Params,
  output: Schema.Struct({ number: Schema.String, pdf: ToolFile }),
  access: 'read',
  execute: ({ params }) =>
    exportInvoice(params.id).pipe(
      Effect.map(invoice => ({
        output: {
          number: invoice.number,
          pdf: new FileBytes({
            bytes: invoice.pdf,
            name: 'invoice.pdf',
            mimeType: 'application/pdf'
          })
        }
      }))
    )
})
  • Files returned as FilePart by tools without output (deprecated ToolResult tools included) are no longer reachable from scripts: the model still sees their labels, the script only the text. Before upgrading, give every byte-producing tool whose files scripts move an output with a ToolFile field (as above).
  • With output, return { output }: Yolk encodes it (Schema.toCodecJson), captures file fields into FileRef ({ fileId, name, mimeType, size }) or FileUnavailable ({ unavailable, name, mimeType }), and shows the model compact JSON with file labels, or render(value, files). output schemas must encode without services and to plain JSON (a FileBytes in a Schema.Any field fails the call); Schema.Void encodes as null. ToolFile belongs only in output: makeTool throws when parameters holds one.
  • resolveTools checks every successful result of a tool with an output schema against it (excess properties rejected) and passes on the checked value; a value that does not match is dropped (logged without the value), so scripts reject the call while the model still sees the content. This covers deprecated ToolResult tools and raw registrations.
  • Raw registrations (not makeTool) whose def.outputSchema is set need decodeOutput: toolOutputDecoder(schema) (@yolk-sdk/agent/protocol); MCP registrations built from mcpToolToToolDef defs need decodeOutput: mcpToolOutputDecoder (@yolk-sdk/mcp/client). Without it resolveTools fails with output_validation_required. For raw interaction registrations, def.outputSchema and decodeOutput describe the action's own value (structuredContent.result of a completed outcome), checked before the receipt is settled (ADR 0013, Result boundary).
  • makeTool with explicit type arguments and output takes three: makeTool<Context, typeof Params, typeof Output>. Two explicit type arguments no longer accept a typed { output } (it used to escape its schema); drop them to infer, or add the third.
  • Without output, return { content }; a structured value needs output.
  • modelVisibleToolError({ code }) gives scripts error.code.
  • Scripts: typed tools resolve to their declared value with no merged files; a typed result without a value rejects (returned an invalid result); untyped tools resolve to their text without file labels; failures reject with the message and error.code. Remove JSON.parse of typed results and typeof r === 'string' guards.
  • MCP tools declare and resolve to { value, files } (value is structuredContent, else the text of the text blocks and embedded text resources, parsed once when it is one JSON object or array, else the text; resource_link blocks never enter it). Read value where scripts read the result itself (upload.value.url, not upload.url). Local stdio calls now list the tools in the same session and validate structuredContent against the listed outputSchema, like remote calls.
  • MCP blobs, images and audio are stored when the call runs: inside resolveTools through the resolution's files; elsewhere (a HITL route calling resumeRemoteMcpServerToolCall, a direct callLocalMcpServerTool) pass fileCapture: makeToolFileCapture({ store }) (@yolk-sdk/agent/tools) on the call input, or every file is FileUnavailable (no file store). Results without file blocks keep their previous model content.
  • Connector gmail.get_attachment, outlook.get_attachment and email.get_attachment resolve to { value, files } instead of { ...metadata, files }.
  • Labels are File parts now: a captured image, document or audio part is followed by a File part with a Ref source instead of a text label, and an unstored file is a File part with the new Omitted { reason } source. Providers render the same text. Readers older than this canary cannot decode transcripts holding an Omitted source.
  • The tool ledger keeps typed values whole: an oversized value replays as an error result. Stored copies keep File parts as parts through every reduction (labels are never flattened into the text).

New, opt-in: @yolk-sdk/connectors/kie adds the Kie connector (GPT Image 2 and Wan 2.7 tasks and their status) with the KieApiKeySlot credential slot. See Kie.

Canary.125: Fortnox invoice Remarks and row inputs

fortnox.create_invoice and fortnox.update_invoice accept Remarks, the invoice text (Fakturatext) printed on the invoice, and FortnoxInvoice returns it. Comments stays the internal note; both are limited to 1024 characters. Invoice write rows change shape, a breaking change for hosts that build them:

  • Write rows are FortnoxInvoiceRowInput, not the read schema FortnoxInvoiceRow. It is a closed schema with a matching type, not a class: replace FortnoxInvoiceRow.make(row) with a plain object typed FortnoxInvoiceRowInput. Read-only PriceExcludingVAT, Total, and TotalExcludingVAT are no longer inputs (Fortnox rejected a written PriceExcludingVAT with code 2000321); send Price.
  • Rows are closed: an unknown row key fails instead of being dropped. Connector execute/invoke fail with validation_failed, generated agent tools reject the call, and FortnoxCreateInvoiceInput.make / FortnoxUpdateInvoiceInput.make throw. executeTyped does not re-check an existing instance, so an instance changed after make is not re-validated. Invoice-level unknown keys are still dropped on execute.
  • Row fields reject null (generated agent tools still treat a model's null as omitted), VAT is an integer, DiscountType is AMOUNT or PERCENT, and Description and Unit follow Fortnox's 255 and 20 character limits.

Hosts that list these tools over MCP serve changed tool schemas once, so grants keyed on a tool snapshot digest return to their default for both invoice write tools.

Canary.124: Effect 4.1.2

Canary.124 targets effect@4.1.2. Upgrade the Yolk packages and Effect together, and move effect and the coordinated Effect runtime packages (@effect/platform-*, @effect/sql-*, @effect/opentelemetry, @effect/vitest) to 4.1.2 together. Three Yolk boundary failures are now typed (below).

  • Effect 4.1 has breaking changes of its own: effect/Crypto is replaced by effect/crypto/* services that runtimes no longer provide implicitly; HttpClientRequest.method is a string (so HttpClientRequest.make(request.method) no longer type-checks); and KeyValueStore, FileSystem.make, ChildProcess templates and McpServer registrations change. Check the Effect 4.1.0 changelog for the APIs your code uses.
  • Tool JSON Schemas generated from Effect schemas are flatter: a nested anyOf is merged into its parent, and a named definition reached from a required and an optional property is emitted once. What each schema admits is unchanged. Hosts that list tools over MCP serve changed tool schemas once, so grants keyed on a tool snapshot digest return to their default for the affected tools.
  • @effect/platform-node 4.1 requires ws ^8.22.1. If another dependency keeps an older ws, the package manager can install @workflow/core twice, and a Workflow build fails with duplicate step ids. Dedupe ws, for example with a pnpm override ws: ^8.22.1.
  • Typed boundary failures, each keeping the original failure as cause when one exists: textFromBlob and documentPartFromTextFile fail with BlobTextReadError (was Error); attachmentSourceText fails with AttachmentTextDecodeError (was the raw decoding error); and writeDurableAgentEvent fails with DurableAgentEventWriteError (was the writer's raw rejection). Code that inspected the raw value reads cause.

Canary.122: connector input numbers

Connector action inputs advertise only finite numbers (bare Schema.Number offered models "NaN"/"Infinity", which argument decoding then rejected). Validation is stricter, for tool calls and in-process invoke alike: an input outside the following constraints now fails validation instead of reaching the provider.

  • Gmail and Google Calendar maxResults, LinkedIn search numResults: integers of at least 1.
  • Notion pageSize: an integer from 1 to 100. Todoist limit, priority and duration: integers from 1 to 200, from 1 to 4, and of at least 1.
  • GitHub issue field number inputs and Fortnox nullable amounts: finite numbers.

Hosts that list these tools over MCP serve changed tool schemas once (these inputs, and the declared outputs of Fortnox tools whose results carry nullable amounts), so grants keyed on a tool snapshot digest return to their default for the affected tools.

Canary.116: subscription pools and quota signals

New, opt-in (ADR 0011): @yolk-sdk/pool serves several accounts of one provider as one LLMProvider. See Share subscription accounts.

  • ProviderErrorInfo gains optional quotaResetsAtMs: on a rate_limit failure for a spent account-wide subscription quota, Claude and Responses providers (ChatGPT Codex) attach the reset when they can read a trusted one. Hosts that persist provider errors in a closed schema should allow it.
  • ProviderSubscriptionUsageWindow gains optional models (model-scoped limits), and Claude and OpenCode Go usage now set windowDurationMinutes. Claude snapshots also report model-scoped weekly windows (seven-day-<model>): hosts that show every window will show them too. The emulators' /anthropic usage route reports one, so tests that count its windows see one more.
  • outlook.get_message now returns internetMessageHeaders: [] for Sent Items and drafts, where Microsoft Graph omits the headers; it used to fail with validation_failed.

Canary.116: Effect 4.0.5

Canary.116 targets effect@4.0.5. Upgrade the Yolk packages and Effect together, and move effect and the coordinated Effect runtime packages (@effect/platform-*, @effect/sql-*, @effect/opentelemetry, @effect/vitest) to 4.0.5 together. Yolk APIs are unchanged.

  • Effect 4.0.5 drops a typed failure when an interruption skipped its recovery handler. If you run connector conformance cases with runConformance and interrupt a run while a case's cleanup fails, a write's outcome is unknown, or a cleanup is refused, the run now ends interrupt-only instead of with the case's error (RestoreFailed, ActionFailed, or CleanupRefused). Read cleanup problems from ConformanceCleanupReporter, which receives them either way. The repository's conformance runners now exit 130 in that case, not 1.

Canary.115: agent status

Breaking for @yolk-sdk/agent/client and @yolk-sdk/agent/react. The string AgentRunStatus is removed; status is now an AgentStatus from @yolk-sdk/agent/protocol, and AgentClientState/AgentChatState gain subagents.

BeforeAfter
status === 'idle' or 'aborted'Predicate.isTagged(status, 'Idle')
status === 'running'Predicate.isTagged(status, 'Working') (or chat.isRunning)
status === 'waiting'Predicate.isTagged(status, 'Blocked') (or chat.isWaiting)
status === 'done'Predicate.isTagged(status, 'Done')
status === 'error', state.errorFailed status: status.message
state.errorInfoFailed status: status.error (absent for transport errors)
state.retryInfoagentStatusRetry(status)
useAgentChat().errorFailed status from useAgentChat().status

markAgentError(state, message, error?) takes an optional AgentError instead of AgentError | null. A stopped run is Idle, as in OSC 7501; there is no separate aborted status. AgentError gains an optional abortReason (user, system, max_turns) on aborted errors: user (or absent) maps to Idle, the others to Failed.

New in @yolk-sdk/agent/protocol: AgentStatus and its variants, AgentActivity, AgentBlockedKind, nextAgentStatus, agentStatusFromEvents, reconcileAgentStatus, AgentStatusTree with nextAgentStatusTree, withSubagentStatus, startAgentStatusTree, and settleAgentStatusTree, plus hitlRequestBlockedKind, agentBlockedKind, agentStatusRetry, isAgentStatusLive, AgentAbortReason, and the subagent result predicates isSubagentAcceptedToolResult and isSubagentObservationToolResult.

Canary.114: file claim check

New, opt-in (ADR 0009): agents move files between tools by fileId. See Move files between tools.

  • ContentPart has a new File member (FilePart): exhaustive Matches over content parts need a case; render it with filePartText.
  • resolveTools captures file bytes even without the new files option: an inline FilePart becomes a "file not captured" label. Pass files: { store } to store them.
  • MCP embedded resource blobs reach the model as a file label instead of base64 text.
  • As agent tools, gmail.get_attachment, outlook.get_attachment and email.get_attachment return a file instead of base64 (connector.invoke is unchanged), and connector sinks such as Gmail draft attachments do not take fileIds yet: hosts that forwarded attachment base64 through the model need their own file-aware tool.
  • Custom VercelSandboxHandle implementations and fakes need readFile, and SandboxInputErrorCause gains invalid_path, file_not_found and file_too_large: exhaustive matches on it need cases.
  • The code mode description gains one line about files, which changes the cached prompt prefix once.

Canary.113: Claude thinking summaries and signed thinking replay

  • Opus 5 and later think by default but return thinking blocks without text. Set thinking: { display: 'summarized' } on makeAnthropicClaudeProviderLayer to stream readable summaries. See Thinking.
  • The Claude provider now keeps each thinking block's signature (or redacted data) on AssistantReasoningPart.replay and sends it back unchanged on later requests, with or without thinking. Never edit, truncate or reorder a reasoning part that has replay; hosts that rewrite history per request can skip parts whose replay.provider is anthropicClaudeReasoningReplayProvider.
  • LLMReasoningReplay is a new AgentEvent (and loop LLMEvent, tag ReasoningReplay) member: exhaustive matches need a case. Live chat projections can ignore it.
  • Claude turns emit it on almost every thinking block, and older SDKs reject unknown event tags: deploy servers and clients together, reload open tabs, and do not roll back to an older SDK over durable logs that contain it.
  • A Claude thinking block that ends without a signature now fails the turn as non-retryable invalid_response.
  • Persist AssistantReasoningPart.replay with the message. React toAgentMessages rebuilds reasoning without replay: hosts that resend chat-derived history should resend the protocol messages instead to keep the reasoning.

Canary.108: tool exposure, catalog instructions, Claude Code 2.1.299

New, opt-in (ADR 0007):

  • loading: 'deferred' keeps a tool out of provider requests until the package tool_search tool loads it. See Defer rarely used tools.
  • A stageable approval tool may be callableBy: 'codemode' (stage-only); resolution used to reject this. See Stage-only tools.
  • makeCodeModeTool({ catalog: 'instructions' }) delivers the code mode catalog as a host instruction (RunConfig.instructions); catalog: 'description' stays the default. Hosts with custom compaction must keep latestInstructionMessages(...), and durable runModelTurn hosts append instructionMessages(...) themselves. See Deliver the catalog as instructions.
  • ToolDiscovery gains pinned, and ToolRegistryError gains deferred_unsupported_tool and duplicate_instruction: exhaustive switches over them need a new case.

The Claude subscription transport identifies as Claude Code 2.1.299 (was 2.1.112), so Anthropic accepts newer models such as Claude Opus 5.5; no code change is required. Proxies or tests that assert the user-agent or billing header need updating. Claude errors now report error.details.error_code (for example claude_code_version_too_old) as providerCode when present, so hosts that match providerCode: 'invalid_request_error' for those failures should match the specific code.

Canary.107: provider prompt caching and Fortnox scopes

Prompt caching is always on and changes outbound provider requests; no code change is required. Anthropic requests carry cache_control markers, Codex and Grok send prompt_cache_key plus their session headers, Vercel AI Gateway sends providerOptions.gateway.caching: 'auto' and x-session-affinity, and OpenCode Go sends x-opencode-session. To benefit:

  • Set cacheKey (for example the session id) on run or runRuntime. It travels in HTTP headers, so keep it printable ASCII.
  • Keep the system prompt and tool list stable within a conversation and move per-request facts (fresh signed URLs, the current time) out of earlier messages into LLMRequest.turnContext.
  • Optionally set promptCacheTtl: '1h' on makeAnthropicClaudeProviderLayer for sessions that idle between turns.
  • Proxies or tests that assert exact request bodies or headers need updating.

See Prompt caching and ADR 0008.

New, opt-in: @yolk-sdk/connectors/fortnox grows from 14 to 91 actions behind nine new opt-in OAuth slots that stay outside FortnoxCombinedOAuthCredentialSlot, so existing consent is unchanged. New host-only helpers: downloadFortnoxOfferPreview, downloadFortnoxInboxFile, and uploadFortnoxInboxFile. The Fortnox emulator serves their reads with unverified synthetic shapes. See Read and write Fortnox records.

Canary.105: Gmail draft attachments

New, opt-in: gmail.draft_compose, gmail.draft_update, and gmail.draft_reply take an optional attachments array of { filename, mimeType, contentBase64 }. It is available from 0.1.0-canary.105. New exports from @yolk-sdk/connectors/google: GmailDraftAttachment, GmailDraftAttachments, GmailDraftAttachmentFilename, GmailDraftAttachmentMimeType, GmailDraftAttachmentBase64, and the limits gmailDraftAttachmentsMaxItems (10 files), gmailDraftAttachmentsMaxBytes (25 MiB decoded in total), and gmailDraftMessageMaxBytes (35 MiB of decoded MIME). See Gmail draft attachments.

  • A draft with attachments is written with one never-retried multipart/related upload to https://gmail.googleapis.com/upload/gmail/v1/users/me/drafts?uploadType=multipart (an update: PUT .../drafts/{id}?uploadType=multipart). Host HTTP adapters must forward that body exactly as UTF-8 and accept outgoing bodies up to about 35 MiB.
  • A draft whose decoded MIME exceeds 35 MiB fails with validation_failed and underlying: { outcome: 'rejected', retryable: false, reason: 'too_large' } before anything is written.
  • gmail.draft_update replaces the whole message: attachments not sent again are removed.
  • Drafts without attachments (absent or empty) are written exactly as before, through the JSON endpoint.
  • The Google emulator does not emulate the draft media upload: a draft with attachments answers its unrecognised 400. See Google emulator.

Canary.104: tool change previews

New, opt-in: approval-gated tools can describe what a call would change with makeTool({ approval, changePreview }). It is available from 0.1.0-canary.104. Pass toolSet.approvalPreviews as approvalPreviews to your loop or runtime config and pending ToolApprovalRequests carry preview (a ToolChangePreview) or previewError; staged plan reviews use the same hook. See Preview the change.

Breaking changes for staged plan hosts:

  • staging.preview is removed. Move it to the tool's changePreview and return a ToolChangePreview ({ target, changes, ... }) instead of arbitrary JSON.
  • ToolPlanPreview ok entries carry params and either preview: ToolChangePreview, previewError ({ cause, message }), or neither (no hook), never both; narrow with entry.status === 'ok' && entry.preview !== undefined. A failing preview no longer turns the entry into status: 'error', and oversized previews are truncated with markers instead of becoming error entries.
  • maxToolPlanPreviewBytes is removed. Use defaultToolChangePreviewMaxBytes (16 KiB) and set the bound with resolveTools(..., { changePreview: { maxBytes } }).

Type changes that may need code updates even if you don't use staged plans:

  • ToolRegistryError has a new cause, change_preview_unsupported_policy (a changePreview on a tool without approval). Update exhaustive matches.
  • ResolvedToolSet has a new required field, approvalPreviews: update hand-built tool sets.

Canary.103: staged tool plans

New, opt-in: code mode scripts can stage approval-gated tool calls with stage(name, args), and a person reviews the plan once through makePlanReviewTool before Yolk applies the selected calls. It is available from 0.1.0-canary.103 and needs makeTool({ approval, staging }) on the tools, resolveTools(..., { interactionHost, plans: { store } }), and one plan review tool. Without them, tool execution and code mode are unchanged. See Stage approval-gated writes and Review a staged plan.

Type changes that may need code updates even if you don't use staged plans:

  • prepareToolBatch now returns Effect<PreparedToolBatch, ToolError>. It fails with ToolError unavailable only when host storage read by an interaction call validator is unavailable; nothing runs, so fail the step and retry it.
  • Interaction call validators (InteractionCallValidator) and validateAction may fail with InteractionHostError for a storage outage, and validateInteractionSubmission then answers the new InteractionAdmissionError cause unavailable: treat it as retryable, not as invalid input.
  • ToolRegistryError has three new causes: staging_unsupported_policy, staging_validation_required, and plan_review_duplicate. Update exhaustive matches.
  • Raw interaction registrations' action validate (InteractionActionHandler.validate) now also receives the interaction call (makeInteractionTool action validate is unchanged), and interaction registrations accept an optional unknownOutcome hook. Existing handlers keep working.

If you adopt staged plans with a tool ledger, resolve the review step with the same ledger scope on every redelivery, keep ledger entries as long as review receipts, and wire your per-call write authorizer as makePlanReviewTool({ beforeCall }): applied calls bypass beforeNestedCall and ToolExecutor decorators.

Canary.102: Gmail draft bodies and thread body decoding

gmail.draft_compose, gmail.draft_update, and gmail.draft_reply keep their inputs and outputs, plus a new optional contentType: 'text' | 'html' (GmailDraftContentType, text when omitted). The draft MIME they write changes:

  • A text body is now 7-bit multipart/alternative (a quoted-printable text/plain part and a derived text/html part) instead of one unencoded text/plain part, so Gmail web no longer hard-wraps it when a person sends the draft. An html body is one quoted-printable text/html part. Write each paragraph as one line. See Gmail draft bodies.
  • Tests, fakes, or recorded fixtures that compare a draft's exact message.raw need updating.
  • gmail.get_thread no longer applies a part's Content-Transfer-Encoding to Gmail's already decoded body.data: quoted-printable text holding =XX (such as ?date=2026) and base64-encoded parts now read back correctly. Remove any host workaround for those bodies.

gmail.send_message is unchanged.

Canary.99: durable tool-call ledger

New, opt-in: resolveTools(modules, context, { ledger: { store } }) runs ledgered tool calls at most once per ledger key when a step re-executes. It is available from 0.1.0-canary.99; without ledger, tool execution is unchanged.

  • Vercel Workflow tool-batch steps are at-least-once: the queue redelivers them after crashes and sometimes while a first execution is still running, even with noWorkflowStepRetry. Hosts that resolve tools inside a step should pass a durable store. See Tool steps run at least once and Ledger writes for re-executed steps.
  • Custom executor or registration wrappers must forward idempotencyKey (like nested).
  • A custom isLedgered should compose defaultToolLedgerPolicy, which also ledgers the built-in subagent tool.
  • Code mode: ToolResult.nestedCalls is now sized from limits.maxNestedCalls (up to 4096) instead of a fixed 256, and NestedToolCalls gains optional per-status counts. Hosts with a higher limit store larger records in step output and audit storage.

Canary.98: extractors package

New package: @yolk-sdk/extractors, bounded text extraction for PDF, DOCX, XLSX, PPTX, CSV, JSON, Markdown, and plain-text files. Existing packages have no API changes, and @yolk-sdk/knowledge does not depend on it.

  • The root export is runtime-portable (FileExtractor, formats, limits, errors). @yolk-sdk/extractors/node is server-only and parses PDF and Office files in a worker thread per file; text formats are decoded in the calling thread. @yolk-sdk/extractors/knowledge exports FileKnowledgeExtractorLayer, which provides KnowledgeExtractor for knowledge ingestion.
  • SheetJS is an optional peer needed only for XLSX. Install it from https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz, not the npm xlsx.
  • In Next.js, keep the package unbundled: serverExternalPackages: ['@yolk-sdk/extractors', 'xlsx'].

Canary.97: Effect 4.0.0

Canary.97 targets the stable effect@4.0.0 release; canary.96 and earlier use effect@4.0.0-rc.115. Upgrade matching Yolk packages and Effect together, and keep effect and the coordinated Effect runtime packages (@effect/platform-*, @effect/sql-*, @effect/opentelemetry, @effect/vitest) on the same version. Tooling such as @effect/language-service is versioned independently.

  • Effect 4.0.0 removes the effect/unstable/* entrypoints. Drop the unstable segment: effect/unstable/http becomes effect/http, likewise effect/socket, effect/sql, effect/process and the other areas; effect/unstable/httpapi becomes effect/http-api. Import Arbitrary from effect.
  • Check Effect-integrated dependencies for removed paths, not just your own code. For example, drizzle-orm 1.0.0-rc.5 declarations still import effect/unstable/sql/SqlError; with skipLibCheck that type silently becomes any and catchTag('SqlError') stops being checked. The Next example pins a declaration-only pnpm patch until drizzle ships a fix.
  • effect/Encoding is split into effect/encoding/Base64, Base64Url, Hex and EncodingError. For example, Encoding.encodeBase64 / decodeBase64 become Base64.encode / Base64.decode.
  • Host Effect code must also adopt upstream renames, such as Schema.isBetweenLength / Schema.isBetweenProperties and Scope.close accepting only a Scope.Closeable. Follow Effect's release notes for semantic changes in your own code; for example, Array, Chunk, Effect and Record partition now return successes before failures.
  • Tool JSON Schemas: Effect 4.0.0 exports Schema.isPattern only when the regex flags are u, optionally with d, g or y, and silently omits other patterns (including v-mode regexes and u combined with i, m or s). Yolk's connector schemas now use u, so connector tool parameters keep their pattern hints with unchanged runtime validation; the Fortnox identifier pattern is advertised as the equivalent BMP-only class ^(?!\.{1,2}$)[\u0020-\u007e\u0080-\ud7ff\ue000-\uffff]+$. Add u to Schema.isPattern in your own tool parameter schemas to keep their hints, and check that u does not change what your regex accepts (surrogate ranges and bounded quantifiers over astral characters can).
  • String Schema.isMinLength(n) and the minimum of Schema.isBetweenLength (n >= 2) are advertised as minLength: ceil(n / 2) code points. Tool execution still validates against the original Effect Schema (through its JSON codec).

Canary.97: tool arguments accept null for optional fields and reject unknown keys

makeTool, makeInputTool/makeInteractionTool call params, and the question tool now decode model arguments with Schema.toCodecJson(parameters), the codec that ToolDef.parameters already advertised. null on Schema.optional(X) now decodes as omitted instead of failing validation; Schema.optional(Schema.NullOr(X)) still keeps null, and required fields still reject it. resolveTools also drops null on properties advertised as optional without null (Schema.optionalKey(X), the subagent model/reasoning_effort, raw MCP schemas) before any registration sees the call. Advertised schemas are unchanged. Non-finite numbers stay rejected. Unknown keys are now rejected (onExcessProperty: 'error') instead of silently stripped, matching the additionalProperties: false that tool schemas already advertised; one error reports every issue, naming each unknown key with the allowed ones (root Schema.Struct({}) tools included), including a null on another union member's field. Callers or fixtures that sent extra keys to a tool now get a model-visible validation error, and app wrappers that only existed to reject unknown keys can be removed. If you worked around this with Schema.optional(Schema.NullOr(X)) plus null-to-undefined mapping, Schema.optional(X) is now enough; app wrappers that re-decoded with the JSON codec can use makeTool directly. Custom invalidParamsMessage callbacks can keep the unknown-key hint with the new withToolArgumentsErrorHint. omitNullOptionalToolArguments is new on @yolk-sdk/agent/tools for hosts that dispatch registrations without resolveTools.

Package-generated agent tools follow the same policy: connector tools from makeConnectorToolModule, knowledge_lookup/knowledge_manage, and the sandbox tool reject unknown keys instead of stripping them. For example, outlook.list_messages rejects the search-only query, and Fortnox invoice update tools reject provider-managed fields such as Booked or Sent. Connector execute/invoke and executeTyped are unchanged.

Canary.97: code mode JSON arguments and structured tool outputs

  • Code mode (@yolk-sdk/codemode, breaking): nested calls that end in an error result, a beforeNestedCall failure, or the maxNestedCalls limit now reject in the script with <label>: <message> instead of the bare message. The label is tools.<identifier>, or tools["<name>"] when an earlier tool already uses the identifier; cancelled and failed-unexpectedly rejections use the same label. ToolResult.nestedCalls keeps the raw message. Update scripts or checks that compare rejection messages.
  • The pi executor now rejects, inside the script and before the call, arguments that JSON would silently change: NaN/Infinity, invalid Dates, undefined/function/symbol array items and holes, functions, symbols, bigints, cycles, Map/Set/RegExp/Error/class instances without toJSON, and arguments with more than 100000 values or 64 levels of nesting. A valid Date is sent as its ISO string. See What scripts see.
  • CodeModeCatalogTool gains a required callLabel; hosts that build catalog entries by hand must set it. Custom executors receive an optional CodeModeExecutorTool.callLabel (set by makeCodeModeTool) and should apply the same argument rules.
  • Connector agent tools (makeConnectorToolModule) return the JSON encoding of the action outputSchema in both structuredContent and the text: Chunks become arrays (instead of {"_id":"Chunk","values":[...]}), DateTimes ISO strings, class instances plain objects, and fields the output schema does not declare are dropped. A value that does not encode fails the call with an execution ToolError. Provider failures keep their text; their structuredContent is the JSON-encoded ProviderFailure, without a non-JSON underlying. Update UI or persistence that read the old shapes. Modules now carry the connector description (override it with the description option).
  • knowledge_lookup/knowledge_manage declare KnowledgeLookupOutput/KnowledgeManageOutput and the sandbox tool declares SandboxToolOutput (with bounded stdout/stderr), returned as structuredContent; code mode scripts now receive these objects instead of the text. Text content is unchanged for the model.
  • New: the experimental @yolk-sdk/connectors/afloat/conformance subpath and the afloat profile of @yolk-sdk/emulators/mcp; see Afloat MCP conformance.

Canary.96: code mode, classifier models, conformance, and emulators

New packages: @yolk-sdk/codemode (Add code mode) and the experimental, test-only @yolk-sdk/conformance and @yolk-sdk/emulators (Test with emulators). @yolk-sdk/agent, @yolk-sdk/connectors, and @yolk-sdk/mcp now depend on @yolk-sdk/conformance for their conformance subpaths; add it yourself only if you import its runner or replay client.

The agent tool contract gains optional fields. Existing tools keep working unchanged:

  • ToolDef.outputSchema (makeTool({ output })), callableBy (default all), and discovery.
  • nestedToolAccess and describe on registrations, and ToolResult.nestedCalls and ToolResult.usage. Neither reaches the model; toolResultMessageFromResult drops both and the loop does not add ToolResult.usage to run usage.
  • ToolRegistryError gains the codemode_unsupported_tool and invalid_tool_exposure causes. If you match its cause exhaustively, add both.
  • If you send ToolDefs to providers yourself (outside run/runModelTurn), filter them with protocol providerToolDefs so codemode-only tools never reach providers.

@yolk-sdk/agent/classification and @yolk-sdk/agent/providers/vercel/ai-gateway-classifier add classifier models over AI Gateway POST /v1/evaluate; see Classifier models. Connector and MCP tool adapters accept an exposure option for code mode.

gmail.draft_delete now succeeds on Gmail's empty 204 response instead of failing to decode it.

Canary.95: Gmail multipart send and Outlook draft attachments

gmail.send_message keeps its { raw, threadId? } input and output and still sends exactly one request. 7-bit MIME now goes to upload/gmail/v1/users/me/messages/send?uploadType=multipart carrying the decoded MIME, so messages up to Gmail's 35 MiB cap are accepted; MIME with any byte >= 0x80 keeps the previous JSON raw request. Decoded MIME larger than 35 MiB now fails before credentials or network with validation_failed and underlying: { outcome: 'rejected', retryable: false, reason: 'too_large' }; nothing is sent. Host HTTP adapters must preserve the multipart/related content type and the string body exactly. Rejected/unknown HTTP classification is unchanged.

addOutlookAttachment is a new host-only helper (not an action) on @yolk-sdk/connectors/microsoft. It requires CredentialResolver and ConnectorHttpClient: its Graph JSON POSTs (fileAttachment under 3 MiB and createUploadSession) use your existing string HTTP adapter, which must allow those POSTs and a success body of maxMetadataBytes plus the echoed base64 content, and must not log, trace or persist those bodies (file content and the token-bearing uploadUrl). Only files of 3 MiB or more need a ConnectorBinaryWriteHttpClient with the new optional uploadSession method; hosts without that method, or without the port at all, fail those uploads with upload_session_required before credentials or network. See Attach a file to an Outlook draft.

Canary.94: Fortnox customer write inputs

This is a breaking change to the Fortnox customer write actions that shipped in canary.90. When upgrading @yolk-sdk/connectors from canary.93:

  • FortnoxCreateCustomerInput and FortnoxUpdateCustomerInput no longer accept Country or Phone. Set CountryCode instead of Country, and Phone1/Phone2 instead of Phone. FortnoxCustomer and FortnoxSupplier responses still include both fields.
  • fortnox.create_customer and fortnox.update_customer reject unknown keys instead of dropping them, before any request is sent. Connector execute/invoke and executeTyped fail with ConnectorError cause validation_failed; generated agent tools reject the call arguments with a tool validation error. Remove Country, Phone, and any other unsupported keys from host-built inputs, and expect model tool calls that include them to fail validation.
  • The inputSchema of both actions is now a closed wrapper, not the input class. Build typed inputs with FortnoxCreateCustomerInput.make / FortnoxUpdateCustomerInput.make. Decoding those classes directly still strips unknown keys.

Invoice write inputs were unchanged in canary.94: execute and generated agent tools still dropped unknown keys (from canary.97, generated agent tools reject them), and executeTyped trusts an existing invoice input class instance without rechecking its keys. See Fortnox write semantics.

Canary.91: OneDrive move/copy and email Sent copy

Upgrading @yolk-sdk/connectors adds three Microsoft tools when hosts pass the complete MicrosoftConnector to makeConnectorToolModule: onedrive.move_item and onedrive.copy_item (write), and onedrive.get_copy_status (read). Copy acceptance is not completion. Hosts that allowlist actions or override access should review the new ids. Copy polling sends no credential to the monitor URL and requires the host HTTP adapter to honor redirect: 'manual' and credentials: 'omit'.

email.send_message now returns sentCopy even for legacy hosts: unsupported when saving was requested but unavailable, or skipped when disabled. Saving is requested by default; set saveToSentItems: false to skip it. A failed or unverified Sent copy after SMTP acceptance does not mean the message was not sent; do not resend.

OpenAI-compatible Chat Completions lower tool-result images, readable text documents, and opted-in PDFs to supplementary user content after the complete tool-result block. Other document formats and audio still fail. Canonical history is unchanged.

Canary.90: Fortnox customer and invoice writes

Upgrading @yolk-sdk/connectors adds four generated write tools when hosts pass the complete FortnoxConnector to makeConnectorToolModule: fortnox.create_customer, fortnox.update_customer, fortnox.create_invoice, and fortnox.update_invoice. Existing Fortnox resource scopes already grant read and write access, so this does not require new OAuth consent.

Read-only hosts should restrict enabled actions explicitly and review any host access override: blanket access: 'read' overrides declared action metadata, including these new write declarations. Keep authorization and approval policy host-owned. Sending, booking, cancellation, and payment remain outside the connector. See Fortnox.

Unreleased: reviewed email connector primitives

  • gmail.send_message is a new destructive action for complete host-generated base64url MIME. It supports new messages and replies whose headers and threadId meet Google's threading requirements. Keep it out of model allowlists unless the host explicitly intends that exposure; a host-owned reviewed interaction is a separate opt-in. Success means submission, not delivery.
  • Its GoogleGmailSendOAuthCredentialSlot uses the existing google.oauth binding and hints gmail.send. Existing gmail.compose, gmail.modify, or full-mail grants already permit sending; the action inspects OAuth scope metadata, then re-resolves through the selected operation slot so strict host resolvers enforce an existing sufficient grant without additional consent. Bearer credentials or missing scope metadata fall back to the send slot. Combined consent and existing draft APIs are unchanged.
  • outlook.update_draft is a new write action for edited recipients, subject, and complete body. Omitted fields remain unchanged; empty arrays clear recipients. Unlike create_reply_draft, its body replaces the full content and does not prepend quoted history. Update followed by send is not atomic and does not provide compare-and-swap.
  • outlook.reply is a new destructive action that sends the complete reviewed reply in one Graph POST .../reply with explicit to/cc/bcc, subject, and full body. Required recipient arrays (including empty ones) prevent provider recipient defaults; no comment, from, quoted history, or draft round-trip is involved. It reuses the existing send-slot mailbox permissions. Only HTTP 202 counts as accepted, meaning submission rather than delivery, with no message ID or exactly-once claim. Prefer it over update-then-send for reviewed replies.
  • None of these three actions retries automatically. Gmail/Outlook unconfirmed-send metadata and Outlook's existing-draft recovery identity must be handled before another mutation. See connector sending and editing.

Action-backed interaction opt-in

makeInteractionTool introduces distinct interaction request, response, event and client-input variants. Update exhaustive HITL consumers before advertising these tools; never downgrade InteractionResponse to data-only input or synthesize a result from InteractionSubmitted. makeInputTool, questions and ordinary approvals retain their existing behavior.

Opt-in hosts must authenticate and atomically accept immutable submissions, provide the scoped InteractionHost, load receipt snapshots before durable preflight, and forward the optional ToolExecutionOptions.interaction reference through executor decorators. Raw HITL responses or client transcript replay are not execution authority. No live example app opts in implicitly. See Authorize one action.

Canary.82: typed inputs and Gateway streaming

When upgrading from canary.81:

  • Prefer resolveTools over hand-built toolsets. ResolvedToolSet now requires inputs; custom toolsets without typed input tools must supply an empty record (inputs: {}). Pass the resolved handlers as inputs: toolSet.inputs to loop/runtime configuration and prepareToolBatch; serializable definitions alone return unavailable instead of prompting.
  • Update exhaustive protocol/client/React consumers for input requests, submitted/cancelled responses, lifecycle events, InputResponseInput, and InputRequested/InputSubmitted/InputCancelled tool states. Extend any host-owned closed persistence/wire schemas before storing or transporting these variants.
  • Keep typed input pending until server acceptance. Invalid response data re-pends the same request for correction; transport failure is not an accepted result. Existing question behavior remains compatible. Input collection is not approval, and voice still supports approvals only.
  • Full run streams now emit synthetic ToolExecutionCompleted events for rejected calls and resolved HITL, including while siblings remain pending. These do not execute tools; custom event consumers should preserve server results without completing the same call twice.
  • Gateway keeps JSON completions by default. Factory streaming: true enables SSE deltas; reasoningContent: true independently preserves compatible reasoning output and assistant replay (spending input tokens). Neither option is enabled automatically.

See typed input wiring and Gateway setup.

Next canary: generic-email labels, flags, moves, and required headers

New @yolk-sdk/connectors actions email.modify_labels, email.set_flag, and email.move work through optional EmailClient host methods; missing methods fail with a typed validation error, so existing adapters keep working. email.get_message now requires headers and runtime-validates host output: hosts that omit headers fail with validation_failed, so update EmailClient.getMessage adapters to return RFC 5322 headers. Outlook outlook.get_message returns required internetMessageHeaders; list, draft, and mutation responses are unchanged.

Next canary: chat-stream failure diagnostics

OpenAI-compatible chat streaming now rejects a 2xx response with an explicit non-SSE content type before reading its body: invalid_response carries providerCode: 'unexpected_content_type' instead of waiting for an incomplete_stream failure. Missing content-type headers retain lenient SSE parsing. Update host error-code handling accordingly; both failures are non-retryable.

ProviderErrorInfo also adds optional stream: ProviderStreamDiagnostics, preserved through LLMError and AgentError. Hosts persisting provider metadata through their own closed schemas should allow this field; it contains counters/milestones only, not transcript or raw response data. See stream diagnostics.

Next canary: Outlook mailbox identity and reply-draft recovery

These @yolk-sdk/connectors changes target the next matching canary; they are not in canary.80.

  • Explicit delegated mailbox operations now resolve the scope-free microsoft.oauth identity slot, then the enforcing operation slot. Hosts must support both resolutions. Set OAuthCredential.accountId to the same Graph user ID or userPrincipalName form passed as mailbox to retain ordinary Mail.* scopes; comparison ignores case only and does not resolve aliases. Other mailboxes still require Shared scopes. Application-mode guards are unchanged.
  • outlook.create_reply_draft now prepends its body to Graph-generated quoted history instead of replacing it. Pass only the new reply. This is a multi-step write; post-create HTTP failures use outlook_create_reply_draft_partial with the HTTP status and no retryAfterMs. Both these failures and post-create typed ConnectorErrors expose underlying: { draftId, retryable: false, recovery: 'read_edit_existing_draft' } when the ID is known. Update retry handlers to read/edit the existing draft, never recreate it. Lost creation responses still require mailbox reconciliation. See reply draft recovery.
  • Attachment listing selects base properties only: fetch the individual file attachment for contentId/cid: mapping. lastModifiedDateTime can now be null as well as absent or a string; update consumers that assume a present value is always a string.

Next canary: chat streaming, Anthropic tool results, union tool schemas

These @yolk-sdk/agent behavior changes target the next matching canary. See Go setup and troubleshooting.

  • OpenAI Chat Completions transport stays one JSON body by default. OpenAiProviderConfig.streaming: true requests incremental chat.completion.chunk SSE deltas with usage; unterminated streams fail invalid_response without Done. OpenCode Go chat always streams. Only enable streaming against endpoints that serve chat SSE.
  • Anthropic tool-result blocks omit is_error when the result carries no error flag, keeping follow-up request bodies valid. Explicit boolean flags are still serialized.
  • makeTool may add root type: "object" to typeless object-only anyOf/oneOf unions for strict OpenAI-compatible upstreams. Call validation still uses the original Effect Schema.
  • Chat Completions and Responses HTTP failures copy the envelope string code (falling back to type) into provider.providerCode; raw upstream bodies stay out of typed failures.

Next canary: selected branded identities and typed connector actions

These source changes target a future matching canary. Identity wire representations stay strings, but typed host implementations and fixtures must migrate; this is a breaking pre-1.0 minor change.

SurfaceMigration
@yolk-sdk/knowledge/documentsUse KnowledgeScopeId and KnowledgeDocumentId in models, store adapters, chunking, ingestion, and search scopes.
@yolk-sdk/harness/inboxForward live DrainToken and ParkGeneration values; custom Inbox/Driver adapters must return the corresponding brands.
@yolk-sdk/sandboxnormalizeWorkspaceCwd now returns NormalizedWorkspaceCwd; raw command cwd remains a string.
@yolk-sdk/connectors/fortnoxFile discovery uses canonical FortnoxGivenNumber; preview downloads require FortnoxDocumentNumber. Archive IDs remain strings.

Effect-decode external/persisted strings with the exported schema; .make is synchronous and is appropriate for trusted constants or freshly minted values. Do not cast raw IDs or annotate ORM columns to bypass decoding. For example, inside an Effect program:

import * as Schema from 'effect/Schema'
import { KnowledgeDocumentId } from '@yolk-sdk/knowledge/documents'

const documentId = yield * Schema.decodeUnknownEffect(KnowledgeDocumentId)(rawDocumentId)

This is a fragment; rawDocumentId is host-owned input. Brands do not establish authorization, ownership, existence, or freshness. Harness token schemas remain nominal-only and accept arbitrary strings; runtime stale/foreign-token decisions remain authoritative. Do not restore old in-memory park generations by decoding them after restart.

Fortnox file metadata now rejects nonnumeric givenNumber values through the canonical schema. Preview identifiers use the same validator as invoice reads and complete-segment URL encoding, rather than unrelated archive-ID restrictions.

defineAction additionally returns TypedConnectorAction with executeTyped. It accepts decoded InputSchema.Type, validates using Schema.toType(inputSchema), and retains the output type. It does not reapply wire transformations: a NumberFromString field is a number at this entrypoint. Existing dynamic execute/invoke paths remain compatible and decode encoded input as before. External output validation remains the implementation's responsibility.

Next canary: Effect rc.115

This source upgrade targets effect@4.0.0-rc.115; it is not a claim that an already-published canary uses that version. Upgrade matching Yolk packages and Effect together when the corresponding canary is available.

  • Use Schema.TaggedError, Schema.fromJsonString(Schema.Unknown) and capitalized Config.String / Config.Int / Config.Redacted APIs.
  • Schema construction now follows schema field order, including _tag first. JSON field values and optional presence are unchanged, but raw serialized bytes can differ. Do not depend on beta.80's property insertion order.
  • Schema.SchemaError is now a native Error. Synchronous schema makers throw a native error with a SchemaIssue.Issue cause; Effectful makers fail with the issue. Keep typed owner errors and inspect retained causes rather than matching old diagnostic text.
  • Tool schemas use Effect's canonical JSON representation. Prefer finite-number schemas for JSON inputs; definition references may acquire an Encoded suffix. Empty-struct tools still advertise a closed empty object. Custom JSON Schema output must still pass Yolk's portable-data boundary.

Next canary: renamed public service types

Update type imports from these existing subpaths. The former names have no compatibility aliases; runtime behavior and wire formats are unchanged.

SubpathBeforeAfter
@yolk-sdk/agent/loopLoopConfigShapeLoopConfigSettings
@yolk-sdk/harness/storeRunStoreShapeRunStoreApi
@yolk-sdk/harness/inboxInboxShapeInboxApi
@yolk-sdk/harness/driverDriverShapeDriverApi

Next canary: optional harness and collector recovery

@yolk-sdk/harness is a new optional run-lifecycle package (coordinator, store, inbox, drivers, outcomes). It is not the agent loop and does not add a Workflow driver. It is introduced after 0.1.0-canary.76 and unavailable in 0.1.0-canary.76 and earlier. Choose a newer matching canary once available.

Loop composition now names makeAgentLoopLayer, decorateLLMProvider, collectModelTurn, and collectModelTurnAttempt. Omitted tools use ToolExecutor.unavailable.

Kernel streams that end with zero Done events fail as LLMError invalid_response / retryable: false with responseIssue: 'missing_done'. That is not automatic provider or tool replay. Codex additionally synthesizes Done only for the specific missing-final-output error; see OpenAI Codex.

Overflow compact now refuses to run after published output (overflowCompactionMayRun). Durable persist-then-retry stays host-owned.

attemptModelTurn classifies one runModelTurn after that stream's inner retries. It does not add an outer retry loop. A finalized collector failure (collectModelTurn / collectModelTurnAttempt) is not host-chosen recovery; see Troubleshooting and Harness composition.

Next canary: owned JSON data and voice session resources

ToolDef.parameters now requires ToolJsonSchema: boolean or plain JSON-object representation. Constructors/raw decode reject nonfinite values, cycles, exotics and accessor fields; accessors are not executed. Dense ordinary arrays, null-prototype objects and DAG aliases are legal. Admitted identity is retained, not frozen. Use decodeToolJsonSchema / decodeToolJsonSchemaObject for raw inputs (Option); JSON Schema semantic/provider validation is separate. Tool arguments/results and HITL stay opaque. Background envelopes preserve boolean argument schemas. MCP discovery requires the object arm and retains typed validation errors and the omitted-schema default.

OpenAiProviderConfig.extraBody now takes JSON-object input (OpenAiRequestExtras). Build inert JSON data, not getter-backed configuration. Lowering snapshots surviving enumerable own fields, discarding canonical request keys unread. Surviving accessors/exotics/invalid JSON fail with fixed Invalid … extraBody JSON: expected a JSON object before HTTP. The snapshot preserves JSON values, own __proto__/constructor and DAG aliases; it does not retain input identity. Root symbols/hidden fields are omitted; nested symbols/hidden fields and extra array properties fail. Final request serialization remains independently checked. Proxy reflection traps are not guaranteed inert.

Connector integration/binding metadata now uses PortableMetadata. Convert Dates, Maps, custom instances and other rich values to explicit JSON first. Decode/make return non-frozen snapshots with null-prototype objects and dense arrays; aliases share copied nodes, cycles/accessors/exotics fail. Absent metadata stays absent. Config, credential secrets, error underlying and host DB schemas are unchanged; this is not a database migration.

makeVoiceController now requires VoiceTransport instead of options.transport. Wrap existing transport values with Effect.provideService, or use VoiceSession.layer with a transport layer, codec/tool endpoint and optional eventLog. Browser/WebSocket transport layer constructors are exported from their existing subpaths. Configured logging runs without an external event consumer; no eventLog means no ambient outbox capture. Keep provided layers alive through the full session usage, or use Layer.buildWithScope for an explicit lifetime. Layer.succeed injects externally owned values; it does not allocate/finalize resources. These are breaking 0.x changes (minor).

Next canary: makeTool SchemaError and workflow CommitError callbacks

makeTool({ invalidParamsMessage }) on @yolk-sdk/agent/tools is now (error: Schema.SchemaError) => string (was (error: unknown) => string). Only Schema.decodeUnknownEffect on parameters invokes it (validate and execute). The decode error is passed through unwrapped. Default remains Invalid ${name} arguments: ${String(error)}, including the SchemaError(...) wrapper. In Effect rc.115, SchemaError extends native Error, but the wrapper remains part of this tool-message contract; do not switch the default to .message. Existing (error: unknown) => string callbacks remain assignable. No new export subpath; MakeToolOptions is still not barreled from @yolk-sdk/agent/tools.

commitThenWriteTerminalEvent({ writeCommitError }) on @yolk-sdk/vercel-workflows is now (error: CommitError) => …, where CommitError is the existing generic on commit. The producer is Effect.matchEffect onFailure of commit; typed failures—not defects or interruptions—are passed to the callback. Result tags still carry commitError and error as unknown; those fields are not tightened. Existing (error: unknown) => … callbacks remain assignable. No generic expansion or export-map change.

Next canary: voice void addTrack, finite voice argument JSON, MCP protocol owners

WebRtcPeerConnectionLike.addTrack on @yolk-sdk/agent/voice/browser is now a void command (was unused unknown). Hosts and fakes must not read a sender. Real RTCPeerConnection.addTrack remains assignable. No export-map change.

Voice raw-argument JSON on @yolk-sdk/agent/voice: protocolToolCallFromVoice and decideVoiceToolCall admit finite JSON. Actual null / false / 0 still admit as those values. Raw text 1e999 uses the existing malformed fallbacks instead of publishing Infinity: projection params are the raw string '1e999'; approval display params are { argumentsJson: '1e999' }. Nested overflow such as {"n":1e999} takes the same fallbacks. Do not demonstrate with JSON.stringify(Infinity) (that is null). protocolToolCallFromVoice still returns ToolCall. Execution schema validation, approval identifiers, and gates are unchanged.

@yolk-sdk/mcp/client and @yolk-sdk/mcp/protocol add Schema owners InitializeClientInfo, InitializeParams, InitializedNotification, and ToolsCallParams (same protocol.ts; no new export subpath). Prefer Schema owners for new construction. Compatibility makeJsonRpcRequest, makeInitializeParams, and makeInitializedNotification remain and build through those schemas. makeJsonRpcRequest still omits params when undefined; when params are present, getter access order stays id, method, params, params.

Next canary: OpenAI JSON admission, Realtime parameters, and Gmail finite JSON

OpenAI Chat Completions and Responses lowering now requires ToolDef.parameters and tool-call params to decode as Schema.Json. Non-JSON values fail as non-retryable LLMError provider_error before transport. ToolDef.parameters now has the admission contract above; ToolCall.params remains Schema.Unknown. Public Codex wrapper OpenAiCodexTool.parameters is still unknown. Optional body fields are omitted unless present. After lone-surrogate rewrite, request bodies are decoded as JSON again and fail rather than skipping. Inbound HTTP JSON admits Schema.Json (invalid_response on failure). Responses SSE JSON admits Schema.Json: non-object JSON events are ignored; malformed non-JSON event text fails. First response.completed remains terminal. HTTP error bodies stay raw text.

The former extraBody spread/getter contract is superseded by the portable snapshot migration above. Canonical fields are discarded unread and surviving accessors are rejected without execution. Composed-body admission after lone-surrogate rewriting remains the final serialization defense.

Public Realtime OpenAiRealtimeFunctionTool.parameters and openAiRealtimeToolParameters now take Schema.Json. Non-JSON advertisement fails VoiceToolBridgeError: sync helpers throw; Effect helpers fail in the typed channel. Mapper defects stay defects. Union-root lowering uses a Map so own __proto__ / constructor merge instead of prototype assignment.

Gmail get_thread / list_attachments MIME payload admits Schema.Json after JSON parse. Best-effort optional size omission (-1, 1.5, null, "12", missing) and sibling preservation are unchanged. Finite JSON is a deliberate whole-payload reject: raw HTTP 1e999 → Infinity → ConnectorError validation_failed (Invalid response shape). Public action classes, GmailUnknownOutput, and gmail.get_attachment are unchanged. Independent raw wire/key goldens were not migrated.

Next canary: Claude JSON tool payloads and React constructor usage

Claude lowering now requires ToolDef.parameters and ToolCall.params to decode as Schema.Json. Non-JSON values fail as non-retryable LLMError with cause: 'provider_error'. ToolDef.parameters now has the admission contract above; ToolCall.params remains opaque. After lone-surrogate rewrite, the Claude request body is decoded as JSON again and fails rather than skipping. HTTP error bodies that are not JSON still classify from status.

useAgentChat now dispatches the existing AgentChatAction constructors and returns the existing hook-result constructors (AgentChatSubmitResult, AgentChatDeleteTurnResult, and siblings). Those values are Data.taggedEnum plain objects with _tag last, not Equal/Hash classes. Prefer constructors and $is; omit absent optionals. Duration descriptors still use Schema.TaggedStruct.make. No new React export paths.

MCP production client/protocol/index are unchanged in this batch. App-owned knowledge-search File identity, Cloudflare occupancy, and example UI wiring are not @yolk-sdk/* APIs.

Next canary: canonical tagged constructors

Several public ADTs that were type-only, or that callers built as handwritten { _tag } objects, now have constructors on existing subpaths. No new export paths.

Data.taggedEnum builds plain objects { ...fields, _tag } (_tag last). They are not Equal/Hash Data classes. Schema.Class / Data.TaggedClass remain class instances. Schema.TaggedStruct.make constructs validated plain values. Prefer constructors; omit absent optionals. Existing _tag reads still work.

Package / subpathBeforeAfter
@yolk-sdk/agent/protocolPlainHitlResponse type-only; helpers wrote _tag (often first)Value PlainHitlResponse.QuestionResponse / .ToolApprovalResponse; helpers omit absent optionals
@yolk-sdk/agent/runtimeexport type { RuntimeRequest } onlyexport { runRuntime, RuntimeRequest } (value carries the type)
@yolk-sdk/agent/reactChat ADTs type-onlyValues AgentChatPart, ChatToolState, AgentChatItem, ToolRunState, message mutators, AgentChatAction, hook results; ToolDurationKnown / ToolDurationUnknown
@yolk-sdk/harness/outcomeStepOutcome / HitlMatch / overflow result type-only or internalPublic StepOutcome, HitlMatch, OverflowCompactionResult
@yolk-sdk/harness/inboxPrivate decision constructorsPublic HitlDecision, PauseDecision, RecoveryAttempt, RecoveryAdmission, DrainBegin
@yolk-sdk/harness/driverexport type StopDecision onlyType + export const StopDecision; recovery uses Inbox RecoveryAttempt
@yolk-sdk/knowledge/documentsInline { _tag: 'File' } / { _tag: 'KnowledgeScope' } objectsKnowledgeFileSource / Url / Text and KnowledgeSearchScope / KnowledgeSearchScopes .make
@yolk-sdk/vercel-workflowsType-only WorkflowStepResult / VercelAgentWorkflowRunResultMatching value companions; settleWorkflowStep returns Success / Failure constructors

JSON key order for Data.taggedEnum values puts _tag last. Do not treat that as Equal/Hash. The knowledge value KnowledgeSearchScope is the single-id constructor; the type remains the union. A missing source URL is not a storage object id; do not invent locators to satisfy .make.

Next canary: host-only connector file retrieval and writes

New byte helpers on existing connector subpaths are host-only. They are not connector actions and makeConnectorToolModule does not serialize them. Provide ConnectorBinaryHttpClient and/or ConnectorBinaryWriteHttpClient, keep streamed limits and connection-time network policy in the host, and keep raw bytes out of generic tool JSON. Dropbox create is strict add; Dropbox update requires a stable id: and expected revision; OneDrive update requires acknowledgeOverwrite: true and is unconditional, not compare-and-swap; R2 puts stay ETag-conditional. Fortnox connectfile and archive slots are opt-in and are not on FortnoxCombinedOAuthCredentialSlot. Drive content defaults to drive.file; contentAccess: 'readonly' is host-only drive.readonly.

Passing whole FortnoxConnector or TodoistConnector into makeConnectorToolModule now also exposes fortnox.list_supplier_invoice_files and todoist.list_comments. See Transfer connector files.

Next canary: host-only Dropbox original-byte download

downloadDropboxFile from @yolk-sdk/connectors/dropbox is an optional host helper that reuses the root ConnectorBinaryHttpClient port. Default Dropbox actions and makeConnectorToolModule serialization are unchanged. DropboxCombinedOAuthCredentialSlot now also hints files.content.read; hosts that consent with the combined slot will request that scope on the next authorization, and hosts that want original bytes should use the new DropboxContentReadOAuthCredentialSlot. See Host-only Dropbox original-byte download.

Next canary: host-only OneDrive original-byte download

downloadOneDriveItem from @yolk-sdk/connectors/microsoft is an optional host helper plus the root ConnectorBinaryHttpClient port. Default Microsoft actions and makeConnectorToolModule serialization are unchanged. Hosts that want original bytes provide the binary port, keep connection-time network policy, and own file materialization. See Host-only OneDrive original-byte download.

Next canary: background tool admission and bounded child observations

Tools with background: true remain unchanged without a BackgroundToolHost. When a host is supplied to resolveTools, activated tools require { execution, arguments } rather than raw business parameters. Update exhaustive event/state consumers for ToolExecutionAccepted and Accepted: admission settles the call but does not complete the work. Preserve the full call and acceptance receipt through persistence, replay, hydration, and next-turn cleanup.

Store and return activated approval request IDs unchanged as opaque, potentially long values; they bind the exact tool, execution mode, and arguments. Resolve voice/realtime toolsets without a background host, even for foreground calls. Custom voice decision consumers must handle Deny; Effect hosts can use the typed realtime config builders to recover from VoiceToolBridgeError. See Model-chosen background execution.

Explicitly include the question definition in the loop's enabled tools to allow question HITL. Omitting it now returns an unavailable-tool result without pausing, even with a replayed answer.

awaitWorkflowChild read/sleep callbacks now receive zero-based attempt indices; existing zero-argument callbacks remain valid. Hosts can stop observation at their own ceiling without claiming the child terminated. For a nonterminal subagent result, use the matching subagent_observation marker and logical child ID to avoid a false SubagentCompleted event. See Nonterminal child observations and Bounded child observations.

Next canary: private attachment resolution

Use resolveMessageAttachmentSources or resolveMessagesAttachmentSources from @yolk-sdk/agent/protocol to resolve media in a request-local transcript copy. These helpers do not automatically sign refs or add provider media support. Keep authorization/signing inside each provider attempt, including overflow retry, while persisted messages retain refs. See Resolve private attachments.

Gmail discovery now omits malformed optional attachment sizes; zero remains valid. Public GmailThreadAttachment schema decoding requires any present size to be a nonnegative integer. Update stored-metadata decoders and fixtures that previously supplied negative or fractional sizes; provider sizes still do not prove actual decoded byte length.

Next canary: opt-in durable subagents

Inline subagent registrations remain compatible. Hosts opting into background: true must implement durable child launch and choose a completion policy. They may deliver findings automatically or expose authenticated status/wait observations through host-owned tools. Return makeSubagentAcceptedToolResult for launch acceptance; it is not final child output and adds no child usage or SubagentCompleted. Storage, ownership, and Stop policy remain host-owned. See Background subagents.

Custom Workflow tool-batch hosts can use prepareToolBatch inside a preflight step and orchestrateWorkflowToolBatch / awaitWorkflowChild in orchestration. Pending HITL fences all launches. Do not wrap an independent child loop in a parent step, and handle partial results plus failures before returning the batch result. See Independent child orchestration.

0.1.0-canary.72: Outlook optional read inputs

outlook.list_messages and outlook.search_messages now normalize null/blank optional strings and null page sizes to undefined for direct calls and generated agent tools. Existing non-blank values are unchanged; search still requires query, and application access still requires a non-blank mailbox. See Optional Outlook read inputs for the accepted fields and validation rules.

0.1.0-canary.57: remove Codex output-token configuration

ChatGPT subscription Codex rejects max_output_tokens. Stop passing maxOutputTokens to makeOpenAiCodexProviderLayer and toOpenAiCodexRequestBody; the optional deprecated field remains accepted but is ignored for compatibility. Keep host-owned input/context budgeting separate from provider output configuration.

0.1.0-canary.55: rename task delegation to subagent

The model-facing task delegation tool is now named subagent to distinguish isolated child-agent runs from durable application tasks. Update tool-name checks and replace the public tools helpers:

PreviousReplacement
makeTaskToolModulemakeSubagentToolModule
makeNonRecursiveTaskToolModulemakeNonRecursiveSubagentToolModule
makeTaskToolDefmakeSubagentToolDef
makeTaskToolRegistrationmakeSubagentToolRegistration
makeTaskToolResultmakeSubagentToolResult
formatTaskResultformatSubagentResult
taskToolNamesubagentToolName
taskSubagentRunIdsubagentToolRunId
Task* public typescorresponding Subagent* public types

The old names are removed rather than aliased. Hosts must expose subagent, omit it from child agent toolsets, and update UI/tool-call matching from task to subagent.

0.1.0-canary.52: Codex omits the unsupported output limit

ChatGPT subscription Codex requests no longer send max_output_tokens because the endpoint rejects that field. In that historical canary, OpenAiCodexProviderConfig.maxOutputTokens remained required host configuration but was not serialized. Since 0.1.0-canary.57, it is optional, deprecated, and ignored; remove it from Codex provider construction.

0.1.0-canary.48: required provider output limits

Provider constructors no longer infer output-token limits or apply hidden fallbacks. Supply the required field for the selected adapter:

Provider configRequired output-limit fieldPrevious behavior
OpenAiProviderConfigmaxCompletionTokensdefaulted to 4096
OpenAiCodexProviderConfigmaxOutputTokenshistorically required but omitted from requests
AnthropicClaudeProviderConfigmaxTokensdefaulted to 8192

In that canary, the public toOpenAiRequestBody, toOpenAiCodexRequestBody, and toAnthropicClaudeRequestBody lowerers also required their limit configuration. Since 0.1.0-canary.57, the Codex compatibility config is optional; OpenAI API and Anthropic lowerers still require their host-owned output limits. The env-backed OpenAiProviderLayer now requires integer OPENAI_MAX_COMPLETION_TOKENS alongside OPENAI_API_KEY. Keep these values in host-owned model configuration.

0.1.0-canary.47: Claude output limits

Anthropic Claude turns that stop at max_tokens now fail as non-retryable invalid_response instead of reporting normal completion. Stream consumers may observe partial text, but no normal Done follows. Increase maxTokens, request shorter output, or adjust host output policy.

0.1.0-canary.46: Anthropic context overflow

Anthropic prompt-too-long responses now classify as non-retryable context_overflow. Generic loop retry does not retry them. Hosts with compaction can use makeContextOverflowRetryProvider to compact and retry once.

0.1.0-canary.46: normalized Gmail threads

gmail.get_thread no longer accepts only { threadId } or returns Gmail's raw thread wire payload. Use this fragment to pass an explicit format:

import { GmailGetThreadInput } from '@yolk-sdk/connectors/google'

const input = GmailGetThreadInput.make({
  threadId: hostGmailThreadId,
  format: 'full'
})

Allowed formats are full, metadata, and minimal; use full when decoded bodies are required. Read normalized messages[].body, bodyMimeType, headers, and attachments instead of Gmail payload, MIME parts, or body.data. Thread output contains attachment metadata only. When attachmentId exists, fetch content through gmail.get_attachment with the parent message id as messageId. Gmail inline attachments may omit attachmentId; their content is intentionally absent from normalized thread output and cannot be fetched through that action.

Upgrade checklist

  1. Update all @yolk-sdk/* dependencies together.
  2. Run typecheck and tests in your host app.
  3. Search for changed subpath imports.
  4. Re-run one agent loop with the fake provider.
  5. Re-run one real provider smoke test.
  6. Re-run one tool call, one HITL pause/resume, and one stream reconnect path if your app uses them.
  7. Re-check connector credentials and OAuth scopes if connector packages changed.
  8. Re-check sandbox lifecycle and Workflow terminal-event ordering if platform packages changed.

What can break during canary

AreaWatch for
Protocolevent names, message fields, terminal state, tool/HITL payloads
Loop/runtimerequired Effect services, runtime request shapes, stream semantics
Client/Reactprojection state, transport headers, resume helpers
Providersauth config, model capabilities, output limits, usage/error metadata
Toolsregistration metadata, access levels, approval semantics
MCPremote/local config, result adaptation, HTTPS policy
Knowledgestore contracts, search request shape, agent tool options
Connectorsaction ids, input/output schemas, credential slots, config keys
Sandboxlifecycle defaults, command result shape, provider adapter options
Workflowscallback contracts, terminal status, retry/default behavior
Harnessdrain/token contracts, claim vs Inbox persistence, recovery budgets

Safe migration pattern

Create one compatibility boundary in your app for each package area:

BoundaryOwns
Agent runtime adapterprovider layer, loop config, enabled tools, stream format
Tool catalogapp-owned tools, connector tools, MCP tools, approvals
Persistence adaptertranscript/session event store and replay repair
Credential adapterOAuth/API token resolution and refresh
UI adapterevent projection, retry display, HITL controls

Then most package changes affect one adapter instead of the entire app.

Stable import habit

Use public subpaths only:

import { runRuntime } from '@yolk-sdk/agent/runtime'
import { listRemoteMcpServerTools } from '@yolk-sdk/mcp/client'
import { GoogleConnector } from '@yolk-sdk/connectors/google'

Avoid root imports for feature APIs and never import from package src/* internals.

Before filing an issue

Include:

  • exact package versions
  • Node version
  • runtime environment
  • relevant public subpath imports
  • minimal reproduction using FauxProvider when possible
  • terminal AgentError or typed provider/tool error metadata

On this page

Version ruleRecent canary migrationsCanary.178: Effect 4.2.0, effect as a peerCanary.163: model step execution ids under Workflow 5.8Canary.158: Fortnox bookkeeping actionsCanary.152: lazy knowledge tokenizerCanary.150: pi code mode executor failure messagesCanary.149: reasoning effort levels and OpenAI chat effortCanary.149: Dynamic Worker code mode CPU limitCanary.145: Cloudflare runtime hook token conflictsCanary.144: Cloudflare sandbox stateCanary.143: non-empty harness pauseCanary.143: test world hook token conflictsCanary.141: idempotent stream closeCanary.131: test world step errorsCanary.126: typed tool resultsCanary.125: Fortnox invoice Remarks and row inputsCanary.124: Effect 4.1.2Canary.122: connector input numbersCanary.116: subscription pools and quota signalsCanary.116: Effect 4.0.5Canary.115: agent statusCanary.114: file claim checkCanary.113: Claude thinking summaries and signed thinking replayCanary.108: tool exposure, catalog instructions, Claude Code 2.1.299Canary.107: provider prompt caching and Fortnox scopesCanary.105: Gmail draft attachmentsCanary.104: tool change previewsCanary.103: staged tool plansCanary.102: Gmail draft bodies and thread body decodingCanary.99: durable tool-call ledgerCanary.98: extractors packageCanary.97: Effect 4.0.0Canary.97: tool arguments accept null for optional fields and reject unknown keysCanary.97: code mode JSON arguments and structured tool outputsCanary.96: code mode, classifier models, conformance, and emulatorsCanary.95: Gmail multipart send and Outlook draft attachmentsCanary.94: Fortnox customer write inputsCanary.91: OneDrive move/copy and email Sent copyCanary.90: Fortnox customer and invoice writesUnreleased: reviewed email connector primitivesAction-backed interaction opt-inCanary.82: typed inputs and Gateway streamingNext canary: generic-email labels, flags, moves, and required headersNext canary: chat-stream failure diagnosticsNext canary: Outlook mailbox identity and reply-draft recoveryNext canary: chat streaming, Anthropic tool results, union tool schemasNext canary: selected branded identities and typed connector actionsNext canary: Effect rc.115Next canary: renamed public service typesNext canary: optional harness and collector recoveryNext canary: owned JSON data and voice session resourcesNext canary: makeTool SchemaError and workflow CommitError callbacksNext canary: voice void addTrack, finite voice argument JSON, MCP protocol ownersNext canary: OpenAI JSON admission, Realtime parameters, and Gmail finite JSONNext canary: Claude JSON tool payloads and React constructor usageNext canary: canonical tagged constructorsNext canary: host-only connector file retrieval and writesNext canary: host-only Dropbox original-byte downloadNext canary: host-only OneDrive original-byte downloadNext canary: background tool admission and bounded child observationsNext canary: private attachment resolutionNext canary: opt-in durable subagents0.1.0-canary.72: Outlook optional read inputs0.1.0-canary.57: remove Codex output-token configuration0.1.0-canary.55: rename task delegation to subagent0.1.0-canary.52: Codex omits the unsupported output limit0.1.0-canary.48: required provider output limits0.1.0-canary.47: Claude output limits0.1.0-canary.46: Anthropic context overflow0.1.0-canary.46: normalized Gmail threadsUpgrade checklistWhat can break during canarySafe migration patternStable import habitBefore filing an issue