CherryHQ/cherry-studio · error · Error
Unsupported agent runtime type: ${entry.agentType}
Error message
Unsupported agent runtime type: ${entry.agentType} What it means
Thrown by AgentSessionRuntimeService.connect when no driver is registered in runtimeDriverRegistry for the entry's agentType. Drivers implement the connect/streaming protocol for a specific agent runtime (e.g. a particular agent SDK); the registry maps agentType strings to driver instances. An unregistered type means the runtime cannot establish a connection and the code fails fast rather than silently no-op'ing.
Source
Thrown at src/main/ai/agentSession/AgentSessionRuntimeService.ts:1453
) {
this.applyRuntimeStateEvent(entry, { type: 'connection-disconnected' })
}
})
this.connectionAttempts.set(entry.sessionId, { id: attemptId, promise: connecting })
const connected = await connecting
if (connected) return true
}
return false
}
private async connect(
entry: AgentSessionRuntimeEntry,
target: AgentSessionConnectionTarget,
attemptId: string
): Promise<boolean> {
const driver = runtimeDriverRegistry.getAgentSessionDriver(entry.agentType)
if (!driver) throw new Error(`Unsupported agent runtime type: ${entry.agentType}`)
this.hydrateResumeToken(entry)
if (!this.isCurrentEntry(entry)) return false
const connection = await driver.connect({
sessionId: entry.sessionId,
agentId: entry.agentId,
modelId: target.modelId,
reasoningEffort: target.reasoningEffort,
knowledgeBaseIds: target.knowledgeBaseIds,
fastMode: target.fastMode,
resumeToken: entry.lastResumeToken,
trace: this.sessionTraceContext(entry, target.modelId),
onSteerInjected: (inputs) => this.reserveSteerContinuation(entry, inputs)
})
if (!this.isCurrentEntry(entry) || !this.connectionTargetEquals(entry, target)) {
void this.closeRuntimeConnection(connection, entry.sessionId)
return falseView on GitHub (pinned to 726446b54c)
Solutions
- Confirm a driver is registered for the agent's agentType in runtimeDriverRegistry (search for registerAgentSessionDriver / the registration call site for that type).
- If the driver is plugin-gated, ensure the plugin/feature is enabled and loaded at startup.
- If the agentType is stale (from an older version or a typo), migrate or recreate the agent with a supported agentType.
- Add a registration for the new agentType if you intentionally introduced a new runtime.
Defensive patterns
Strategy: validation
Validate before calling
// Before opening a session, confirm a driver is registered for the agentType
const driver = runtimeDriverRegistry.getAgentSessionDriver(agent.agentType)
if (!driver) {
throw new Error(`No runtime driver for agentType '${agent.agentType}'. Register one or use a supported type.`)
} Type guard
const isRegisteredAgentType = (t: string): boolean => runtimeDriverRegistry.getAgentSessionDriver(t) != null
Prevention
- Register every agent runtime driver in the registry at startup.
- Validate persisted agents against registered driver types on load; flag stale types to the user.
- If drivers are plugin-gated, fail loudly at startup when a required plugin is missing rather than at connect time.
- Keep agentType strings versioned and migrate them when renaming a runtime.
When it happens
Trigger: An agent session is created with an agentType that has no driver registered — e.g. a new agent type was introduced in data without a corresponding driver, a plugin/driver failed to load or register at startup, or the agentType string is a typo/mismatch between the persisted agent and the registered driver keys.
Common situations: Adding a new agent runtime but forgetting to register its driver in the driver registry; a conditional/plugin that registers a driver did not load (disabled feature flag, failed import); a data migration or import created an agent with an agentType the current build does not support; version skew between the persisted agent type and the installed app version.
Related errors
- Agent not found: ${agentId}
- Channel not found: ${channelId}
- Failed to resolve image model: ${modelId} for provider: ${pr
- [theme-contract] theme-input.css declares unregistered runti
- [theme-contract] product variable ${token} overlaps the offi
AI-assisted analysis of CherryHQ/cherry-studio@726446b54c (2026-08-12).
Data as JSON: /api/errors/ab1b4e00b915812e.
Report an issue: GitHub.