v0.20 release details
The headline, breaking changes, upgrade checklist and security fixes for v0.20.0 are on What’s New. This page carries the smaller API additions, the security review of new features, CLI changes and fixes. Deprecations, harness and kernel, tool, provider, runtime, UI and Cortex changes are on v0.20 changes by area.
Smaller API additions
Section titled “Smaller API additions”- Low-level MCP server API.
@reactive-agents/mcp-serverexportscreateAgentMcpServer({ name, description, executor }), which works over any MCP transport (stdio, in-memory, your own HTTP), andserveAgentMcpHttp(...), which serves it over stateless streamable HTTP at/mcp. The agent arrives as an injected executor and receives only the input and an abort signal, never the bearer token. The server reports its package version unless you passversion. Most apps callagent.serveMCP()instead. See Serve an agent over MCP. - OAuth verifier types from one import.
OAuthTokenVerifierandAuthInfoare exported from@reactive-agents/runtimeandreactive-agentsbesideMcpOAuthOptions, so a customserveMCP({ oauth: { verifier } })needs no second import from@reactive-agents/mcp-server. See OAuth 2.1 resource server. - Agent Spec exports on the facade.
reactive-agentsexportsAgentSpecAgentSchema,AGENT_SPEC_MAX_READ_VERSION,AGENT_SPEC_METADATA_KEYandAGENT_SPEC_METADATA_VERSION, as@reactive-agents/runtimedoes. See Portable Agent File. secureServe({ authenticate }).secureServefrom@reactive-agents/runtime-shimaccepts anauthenticate(req)hook as an alternative to a statictoken. The hook returns{ ok: true, auth }, whichfetch(req, auth)receives, or{ ok: false, response }, which is sent as is. A hook that throws fails closed with a bare401. Withauthenticateset, a non-loopback bind is allowed; the 1 MiB body cap still runs first. Passing bothtokenandauthenticateis a type error and rejects at startup withSecureServeConfigError. Existingtokencallers need no change. See Your own HTTP endpoints.- MCP login store location.
REACTIVE_AGENTS_MCP_AUTH_DIRmoves the stored-login directory (default~/.reactive-agents/mcp-auth); it is read when a store is built, so tests and host apps can keep logins out of the real home directory.resolveMcpAuthDirandMCP_AUTH_DIR_ENVare exported from@reactive-agents/tools. See Where tokens are stored. - Injected environment for Ollama resolvers.
resolveOllamaEndpoint(explicit?, env?)andresolveOllamaTarget({ ..., env? })accept an environment (defaultprocess.env). When you pass one, theOLLAMA_ENDPOINT/OLLAMA_HOST/OLLAMA_BASErungs andOLLAMA_API_KEYare read only from it.DEFAULT_OLLAMA_ENDPOINT(http://localhost:11434) and theOllamaEnvtype are exported from@reactive-agents/llm-provider. Existing calls behave the same. See Local Models. - Key store lock timeout.
openProviderKeyStore({ lockTimeoutMs })(default 5000 ms) bounds the wait for the store’s lock file. The store refuses symlinked or non-regular files and a symlinked directory, forces an existing directory to0700, and serializes concurrent writers (for examplerax keys setwhile Cortex saves a key), so neither loses a key. Seerax keys. - Tool schema exports.
FILE_CONTENT_ANY_OFand theFileContentBranchtype are exported from@reactive-agents/tools. An object parameter without a declared shape getsproperties: {}, the form providers already received after repair. See Custom Tools. - Run control contracts.
RunControllerLikegains an optionalonInterruption(listener, { pause? })that fires the moment a stop or terminate (and optionally a pause) is requested, and the runtime’sRunControlleraddsonControl(listener)to follow the control timeline live.RunControlKind("pause" | "stop" | "terminate") comes from@reactive-agents/core, andToolEffectOutcome/ToolEffectRecord.statuscan be"interrupted".@reactive-agents/ui-core’sUiStreamEventhas typedRunControlRequestedandRunControlAppliedmembers. See How fast control takes effect. RunPausedevent. A run that pauses at a tool approval or a pending user question publishesRunPaused(the gate, the tool name or interaction kind, iterations so far, duration and run-tree ids). It is not a terminal outcome and is separate from the kill-switchAgentPaused. Traces record it asrun-paused, so a paused run no longer reads as incomplete, and the result-boundary verifier no longer records a failing verdict for a pause; the resumed run is verified when it ends. See Pausing (durable).- Carry discovered tools between runs.
run()andrunStream()takediscoveredTools(names to seed the run with) andonDiscoveredTools(called at run end with the run’s discovered names);session()uses them to carry up to 20 tools across chat turns. Seerun(). - Per-call context attribution in traces.
llm-exchangeevents can carrycallId,contextWindow, atoolSchemasmanifest andcontextsection sizes;tool-call-start,tool-call-endandsignal-renderedcarryllmCallId. The shapes come from@reactive-agents/core(andCompletionRequest.traceContext, typedLLMTraceContext, accepts them);@reactive-agents/traceaddsexchangeByCallIdandresolveToolSchemaBodies. All fields are optional. See What each model call was made of. - Tool schema allocation record.
ToolSurfaceResolvedEmittedand thetool-surface-resolvedtrace event gain an optionalallocation: each tool’s presentation (full,compactorindex), the reason, its wire tokens, and the turn’sspent,budgetandoverrun. See Disclosure. - Action-grounding judge in core.
@reactive-agents/coreexportsjudgeActionGrounding({ task, answer, toolResults })withrequestedChange,claimedChange,tallyActionCalls,isActionTool,verifyCommandFailureand theMETA_TOOLS,HARNESS_PSEUDO_TOOLSandREAD_ONLY_TOOLSsets. An optionalmutatingToolslist counts only those tools as actions and also treats requests aimed at a page, issue, message or channel as change requests.READ_ONLY_TOOLSnow coverscrypto-price,request_user_input,scratchpad-readandscratchpad-write. Directory navigation (“change into the photos folder”) and questions (“Has the config been updated?”) no longer read as a change request or a change claim. The verb rules read English text. See Action grounding and verify command. - URL secret rule as a function.
redactUrlSecrets(url, { placeholder? })from@reactive-agents/runtimereturns{ value, redacted }with userinfo removed and each secret path segment and credential query value replaced (default[redacted]), the rule every config export uses. See URL secrets. - Check
additionalRootswithout building.validateAdditionalRoots(value)from@reactive-agents/runtimeapplies the.withTools({ additionalRoots })rules and returns oneAdditionalRootIssue(reason,index,path,message) per bad entry, or[]. See Extra directories. - Extra roots in the tools package.
withAdditionalRoots([{ path, access }], fn)from@reactive-agents/toolsgrants extra roots to the file tools and the shell outside the builder. See Extra directories. - Persona fields everywhere.
traitsandresponseStyleround-trip throughtoConfig()/fromConfig(),agentConfigToSource(), the Agent Spec export and.withAgentTool()sub-agent personas.@reactive-agents/channelsexportsTriggerPersonaandTriggerPersonaResponseStyle, matchingAgentPersona..withPersona(),.withAgentTool()andagent.start()throwPersonaOptionErrorfor a bad value, and a trigger’sderive()that produces one drops that turn. See Model & Provider. - MCP schema converter.
mcpInputSchemaToParametersis exported from@reactive-agents/tools, andToolParameterhas an optionaljsonSchemafield that carries the server’s schema verbatim. See MCP Tools. - Smaller exports.
ChannelTurnAcknowledgedgainstext, the ack actually sent.setScratchpadBoundedreturns{ spilled }(ScratchpadWriteResult,SpilledScratchpadEntry).findBlockedReason(command, rules?, allowList?)takes the effective allowlist,BlockedCommandRulegainsalternative, andcreateToolCallResolverreturns a resolver for every provider instead of throwing. The memory classifier is exported asisSelfCapabilityClaim,containsSelfCapabilityClaimandstripSelfCapabilityClaims. - More from
reactive-agents. The goal API (pursueGoal,evaluateGoal,goalRunOf; experimental), receipt signing (generateReceiptKeyPair,signReceipt,verifyReceipt),BuildValidationError,AgentStreamCollectErrorand the option and handle types you name (ChatOptions,SessionOptions,RunHandle,ToolsOptions, …) no longer need@reactive-agents/runtime. See Agent sessions and control. - Eval behavior and text checks.
EvalCase.expectedBehavioris now graded (shouldUseTool,shouldAskUser,maxSteps,maxCost, with no judge call), a case takestextchecks (contains,not-contains,matches), andgradeBehaviorandgradeTextare exported. A failing check outranks an inconclusive one, so the case verdict isfail. See Grading without a suite. - Tool call outcomes.
ToolCallCompletedgains optionalnotExecutedandfailureKind(ToolCallFailureKind), set by the kernel for a call that never ran or failed, andToolCallStarted/ToolCallCompletedan optionalinitiator: "harness".@reactive-agents/toolsexportsToolFailureKindandfailureKindOf,ToolOutputgainsfailureKind, andToolResultCachegainsclear()and ascopeargument. - Trace activity keys.
eventActivityKeys(event)from@reactive-agents/tracereturns the keys one event contributes. Keys addguard:<guard>:pass@<why>,decision:<type>:<patchKind>anddecision:<type>@untried-route, and every act-or-answer activation leaves one. - Missing-key error.
ProviderKeyMissingError(provider,envVar) is exported from@reactive-agents/runtime. The key is read at run start; Ollama, a custombaseUrl, an inline key and a fallback chain are unaffected. - Config fields.
createAgent({ reasoning: { maxIterations } })works (execution.maxIterationswins when both are set), andstallPolicy.stallThresholdround-trips throughtoConfig().resolveControllerConfig(),stallThresholdInForce()andTHINK_GUARD_IDSare exported. - Previous-iteration evidence.
RunAssessmentin@reactive-agents/reasoninggainspreviousEvidenceDelta. TheControllerEvalParamsfield rename is under Breaking changes on What’s New.
Security review of new features
Section titled “Security review of new features”The new network and key features went through a security review before this release. The fixes to features that shipped before 0.20 are under Security on What’s New. For agents served over MCP:
- One request starts at most one run: a JSON-RPC batch with more than one
tools/callgets400, andmaxConcurrentRuns(default 4) caps runs in flight. Calls past the cap get aServer busytool error. - A run that throws or fails with an
errorreaches the caller asAgent run failed; the detail goes to theonErrorhook (default: one line on stderr). An abstention still saysAgent declined to complete the task: <reason>. Rejections do not echo theHost,Originor tool name.agent.serveMCP()takesmaxConcurrentRunsandonErroron both transports. - A host cancel or a closed connection stops the run:
serveMCP()passes the call’s abort signal torun(input, { signal }). Agents built with.withDurableRuns()and plan runs do not honor it yet. Seerun(). - In OAuth mode, a custom verifier’s token without an expiry is refused unless you set
allowTokensWithoutExpiry, andrequireAccessTokenTypeopts in to the RFC 9068at+jwtcheck. A wildcard bind (0.0.0.0,::) needsallowedHosts, orRA_MCP_ALLOWED_HOSTSforrax serve. See Bounded work.
For agents served over A2A and for agent files:
agent.serveA2A()no longer sends a run’s error text to remote callers. A failed run, or arun()that rejects, ends as a failed task withAgent run failed; the detail goes to the newserveA2A({ onError })option (default: one line on stderr). An abstention keeps itsAgent declined to complete the task: <reason>wording. See A2A protocol.- A file reads only the environment names its fields allow. A
{ "$env": "NAME" }reference resolves only whenNAMEis the name the export writes for that field (for exampleMCP_<SERVER>_<HEADER>), or a name you pass inallowEnv; refused names are listed inmissingSecrets, and the newresolvedEnvfield lists every name that was read. See Secrets. rax run --agentandrax serve --agenttreat the file as untrusted input. A file that starts stdio MCP servers, setstools.terminal, reads environment values or lists remote agent tools (agentTools[].remoteUrl) shows what it would do and asks on a terminal; off a terminal it exits2unless you pass--trust-file. When an environment or saved key would be sent to the file’sllm_config.url,raxexits2and names the endpoint;--allow-file-endpointaccepts it. See Files that run commands and The file’s model endpoint.- An imported agent file cannot turn on telemetry or point Cortex reporting at its own URL.
loadAgentFile()andagentConfigFromAgentSpec()leave out an uploadingreactiveIntelligence.telemetryand anobservability.cortexwith aurl, and list them in the newdroppedTelemetryfield. PassallowTelemetry: truefor a file you trust.raxprints one line per left-out setting and keeps them only with--trust-file; Cortex import lists them in its notes and never keeps them. Apps that import configs of their own can call the same rule:dropUntrustedTelemetry,telemetrySettingsLeavingMachineandreadAgentFileValueare exported fromreactive-agents. See Telemetry and Cortex reporting.
rax mcpruns on the public login API.rax mcp login <name>records the server name with the login, andrax mcp statusshows that name plus aStatusline (signed-inorexpired).statusskips stored records that hold no tokens (for example, only a registered client).--scope "a b"is sent as two scopes. Flags are unchanged, and tokens are never printed. Seerax mcp.RA_MCP_ALLOWED_HOSTS.rax serve --protocol mcpreads a comma-separated list of hostnames accepted in theHostheader. A wildcard bind (RA_MCP_HOST=0.0.0.0or::) needs it for DNS-rebinding protection; without itrax serveexits2and names the variable.--transport stdioruns throughagent.serveMCP({ transport: 'stdio' }), so stdio and HTTP hosts share one executor and decline message. Seerax serve.rax psandrax attachreadREACTIVE_AGENTS_RUNS_DIR. They find runs under that directory when it is set (the same<dir>/<agentId>/runs.dblayout the runtime writes), as well as~/.reactive-agents. Seerax ps.- Missing keys are caught early. The missing-key error of
rax runandrax serve(exit2) names both fixes:export <ENV>=<your-key>andrax keys set <provider>.rax servechecks for the key before it starts instead of failing on the first request. See How rax picks a key. rax runworkspace and safety flags.--workspace,--workspace-context,--terminal,--allow-commandand--approve ask|denyeach map to one builder option and override the agent-file field they shadow, keeping the file’s other fields. A flag counts as your consent, so it needs no--trust-file. See Workspace, terminal and approval flags.- First-run fixes.
rax demo,rax benchandrax evalwith--helpprint help and run nothing (demo --helpused to run the demo).rax --helplists commands that work from an npm install with no key,rax create agent --recipegenerates agents with built-in tools, andrax initrejects a name that starts with-. See CLI. rax-diagnosenames more causes.causereportsungrounded-success(no-actionoraction-failed) for a run that reported success while its tool results show the requested change was never made, including changes outside a file such as a page or an issue;attributereportsharness:ungrounded-success.attributenamesharness:answer-turn-tool-callwhen the model spent the exit gate’s tool-free answer turn on a tool call. A run paused for approval or an answer ispausedand counts as not failed. A user stop isuser-stop/stop-requested, an abstention after the shell policy refused every call istool-failure/policy-denied, a plan-mode run the give-up gate failed isplan-posture-veto/give-up-gate, a tolerated partial issuccess-with-warning/tolerated-partial, and a model’s fabrication veto after an earlier iteration cap readsverifier-rejectinstead ofbudget-cap. Over 1,094 recorded Cortex runs, unattributed failures fell from 86 to 16. Seerax-diagnose.
-
The docs MCP server answers less, and better. It indexes only runnable examples, applies a relevance floor with a typo fallback, and tags docs links with
?utm_source=docs-mcp(it still makes no network request). Each page carries its kind and sidebar group:search_docstakesdocType, the newlist_docsbrowses by group or kind, and release notes stay out unless asked. Theversionresult hasdocsUrlin place ofdocsBaseUrl. See Use the docs MCP server. -
Node prints no SQLite warning. Opening a database on Node no longer prints the SQLite
ExperimentalWarning; other warnings still print. -
Replay is more faithful. The stop reason is carried on the stream path, and replayed tool-call ids are unique per run.
-
Answers without a named format are prose. When the request names no output format, the final answer’s prompt asks for clear natural language, so the model no longer echoes raw tool JSON. Requests that name a format (table, markdown, JSON, CSV, code, list) keep it. See Structured Output.
-
Format and intent read the current turn only. Output-format and task-intent detection read only the current user turn, so a chat turn after a history that mentions “in JSON” is no longer forced into a JSON answer. See Chat and sessions.
-
Built-in tool schemas need no repair. A default
withToolsagent no longer logstool-schema-repaired toolName=file-writeon its first run, anddefineToolobject parameters no longer trigger the warning either. See Custom Tools. -
Provider log lines go to stderr. The
tool-schema-repairedwarning and the Ollama streaming path’scontent-part-degradedwarning print as a logfmt line on stderr. They used to go throughconsole.log, which broke piped output and MCP stdio serving. See Serve an agent over MCP. -
No false durable-run warning.
.withDurableRuns()without.withReasoning()no longer warns that the run will not checkpoint. Every run goes through the kernel, so those runs checkpoint and resume like any other. See Durable Execution. -
rax run < task.txtreads the file. With stdin redirected from a file,rax runread an empty task under Bun and exited2. Seerax run. -
A failed MCP connect’s
causechain is redacted the same way as its message, andisHttpsOrLoopbackreturnsfalsefor a string that is not a URL and countshttp://[::1]as loopback. See Connection failures. -
MCP tools keep their full input schemas. Each parameter reaches the model as the server declared it: array item objects, nested properties,
enum,anyOf/oneOfand defaults. Before, only name, type, description and required were kept, so Notion’snotion-create-pagespagesshowed asstring[]and models sent strings.$refinto the root$defsordefinitionsis inlined at its first use (later uses point to it), so no$refreaches a provider, and a tool whose parameter schemas still exceed 16,000 JSON characters is cut from its deepest level up; validation still uses the full shape. The validator rejects a non-object element in an array of objects and names its index. On compact profiles, nested descriptions are removed and the shape is kept. See MCP Tools. -
Gemini tool schemas are sanitized. Schemas sent to Gemini keep only the fields its
Schemaaccepts;propertyNames,patternProperties,$ref,if/then/else,notandadditionalPropertiesare dropped at every depth,oneOfbecomesanyOf,allOfis merged, a stringconstbecomes a one-valueenum, andtype: "null"becomesnullable. Before, one such keyword (the Notion MCP server’spropertyNames) failed every request with HTTP 400. Other providers are unchanged. See LLM Providers. -
Text-parse models execute their tool calls. A provider that reports no native tool calling (such as
qwen2.5-coder:7bon Ollama) gets the kernel’s tool-call resolver too, so a printed<tool_use>call is parsed against the run’s tools and executed, and the markup is dropped from the answer. A malformed call gets a reprompt. Shell refusals now read one effective allowlist, so they no longer suggestxargswhen it is not granted or list a granted command as opt-in. See Reasoning. -
Generation loops fail honestly. The always-on
output-not-degenerate-repetitionverifier check fails an answer of 300+ words when 90% or more of its 8-word runs repeat earlier text, scored on the whole answer and on its last 1,000 words. Amax_tokensretry gets 4 times the cap that truncated (at most 64,000) instead of a flat 64,000. Found whenqwen2.5-coder:7brepeated one block for 13,521 tokens and the run reported success. See Verification. -
recallreads.recall(key, maxChars: N)returns the first N characters of the entry, not a 200-character preview. A section read withoutkeyreturns the entry list with a hint that shows the call withkey;contentwithoutkeyis still an error. See Input Validation. -
Runs that still produce evidence are not stopped early. The low-delta guard and the reactive-intelligence early stop near the iteration cap read one check: new substantive evidence in the current or the previous iteration. A real stall still ends the run early. See Reactive Intelligence.
-
Plan runs. A plan-mode run is no longer failed as an abstention for having no tool evidence; a plan-mode answer that claims an action on a harness-forced stop is still dropped. A plan-execute step ends on the model’s answer through the exit gate, not when every listed tool has succeeded once, so a step that looks up five cities one call at a time no longer stops after the first. See Plan, then execute.
-
Many tools on a small window. History compaction sizes the thread against tool schemas as they ship on the wire (it subtracted the internal JSON, 6.5-8.6 times larger, and dropped turns early), and each dropped tool result leaves a one-line digest so the model does not re-run the tool. Under
disclosure: "auto", a change request’s named write tool and the same MCP server’s read tools ship on turn 1, index entries ship as callable stubs on native function calling, the agent’s own tools always ship before MCP tools, and a run whose named write never succeeded no longer endssuccessbecause a different write did. See Disclosure. -
Channel triggers. A
.withChannels()gateway withoutroutesruns one turn per inbound message (a native adapter’s message also ran a second chat turn, without the trigger’s persona), and trigger agents receive the whole persona. Every channel-routed agent gets oneEnvironment:line asking it to say what it is about to do before using tools, so the narration ack has text to send. See Acknowledging slow turns.
Install
Bun (recommended)bun add reactive-agentsNode 22.5+npm install reactive-agentsGet notified on new releases
Release notes, about once a month.