Python SDK 0.26.0 and TypeScript SDK 0.23.0 report input requests and stop retrying Session executions
Both SDKs move to the2.0.0-rc.11 API client. A Session tool that needs user input now raises a typed error instead of returning an empty result, Session executions are no longer retried, and tool schema patterns run on a linear-time regex engine.
Release versions
This release also publishes
@composio/anthropic 0.11.4, @composio/json-schema-to-zod 0.3.4, and @composio/experimental 0.2.7. The Python provider packages are released at 0.26.0.
Breaking changes
TypeScriptToolRouterSessionConfig(session.config, the result ofsession.update()) andToolRouterSessionConfigHistoryConfig(session.listConfigHistory()) are the client’s own types.instantis always present, asfalseor the policy object.- In those types,
toolkitsand eachtoolsentry can be a{ require_approval }-only object, so a check forenabledordisabledno longer covers every case.tagscan carryrequire_approval, and the config can carryproxy_execute. - The Session config is returned as the API sent it. The SDK no longer validates
instantat runtime or removes apremium_usagekey. ToolRouterSessionExecuteResponserequiresresultType. A customToolCallSessionpassed to a provider must return it fromexecute(), becausesuccessfulis no longer derived fromerror.ToolRouterInstantResponseSchemaandToolRouterInstantResponseare no longer exported. UseToolRouterSessionConfig['instant'].
session.execute().instant_chargeandsession.config.instantare models, not dictionaries.ToolRouterSessionExecuteResponseandToolRouterSessionSearchResponsealias the client’s classes.ToolRouterInstantResponse,ToolRouterInstantResponseEnable,ToolRouterInstantResponseDisable, andToolRouterInstantAccountare gone fromcomposio.core.models.tool_router_session. The input typesToolRouterInstantConfig,ToolRouterInstantEnable, andToolRouterInstantDisableare unchanged.ToolExecuteParamsno longer hasallow_tracingandentity_id, which were never sent to the API.
- In Python, replace dictionary access on Instant charges and the Session
instantpolicy with attribute access. - In TypeScript, return
resultType('completed'or'failed') from any customToolCallSession.execute(). - Where you inspect a Session config, handle
toolkitsandtoolsentries that only carryrequire_approval.
What’s new
- Input requests. A Session tool can ask for user input, such as an approval, instead of running.
session.execute(),session.proxyExecute()(session.proxy_execute()in Python), provider-wrapped Session tools, and the helpers passed to custom tools raiseComposioToolInputRequiredErrorin TypeScript andToolInputRequiredErrorin Python. The error carries the questions oninputRequests(input_requests) and the opaque continuation state onrequestState(request_state), which is kept out of logs and serialized output. Nothing was executed and the call is not retried. The SDKs do not submit answers yet. - Execution result type. Session executions report
resultTypein TypeScript andresult_typein Python ascompletedorfailed. Read it rather thanerrorto tell a failure from a success: a failed execution can carry an emptyerror, and it is no longer reported as successful. user_idon direct proxy calls.composio.tools.proxyExecute()acceptsuserIdand Python’scomposio.tools.proxy()acceptsuser_id. Projects with 2FA enabled check it against the connected account and may require it.- Python Anthropic tool caching.
AnthropicProvider(cache_tools=True)attaches Anthropic’s ephemeralcache_controlto the last tool definition, which caches the whole tool list. - Python OpenAI Agents strict mode.
OpenAIAgentsProvider(strict=True)registers tools with schemas normalized for structured outputs. A schema strict mode cannot express falls back to the non-strict path.
Bug fixes
- Session executions are sent once.
session.execute(),session.proxyExecute(), provider-wrapped Session tools, and the custom tool helpers no longer retry after a timeout, a connection error, or a408,409,429, or5xxresponse, so a retry cannot repeat a side effect such as sending the same email twice. This matchestools.execute()andtools.proxyExecute(). The experimental workbench helperrun_composio_toolfollows the same rule and reports failed and input-required answers as errors. - Linear-time schema patterns. Tool schema
patternandpatternPropertiesregexes run on a linear-time engine in both SDKs, so a pattern such as^(a+)+$can no longer hang argument validation. ApatternPropertieskey that needs lookaround or a backreference fails conversion. - Strict mode with optional enums. Optional
enumandconstparameters,typebesideanyOf, and$refwith sibling keywords are wrapped whole inanyOfwith anullbranch, so the model can omit them under strict mode. - Portable file names. Server-provided file names with characters Windows reserves, such as
report_2026-09-29T10:30:00.csv, are saved with those characters replaced instead of being rejected. Default saves never overwrite an existing file. Python automatic downloads follow validated redirects again. - Object-rooted tool schemas in TypeScript. Parameters that use
anyOf,oneOf,allOf, or$refconvert to aZodObjectagain, so the LangChain, Vercel, LlamaIndex, and Claude Agent SDK providers send a top-leveltype: "object". - Anthropic cache breakpoints in TypeScript.
cacheTools: trueplaces a single breakpoint on the last tool and no longer markstool_resultblocks, staying within Anthropic’s limit of 4 breakpoints per request. - Gemini automatic function calling in Python. Tools with optional or constrained arguments run through automatic function calling again.
Improvements
- Both SDKs send product identity, product version, language, and runtime version with API requests.
@composio/coreand@composio/slimare identified separately.