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 false

View on GitHub (pinned to 726446b54c)

Solutions

  1. Confirm a driver is registered for the agent's agentType in runtimeDriverRegistry (search for registerAgentSessionDriver / the registration call site for that type).
  2. If the driver is plugin-gated, ensure the plugin/feature is enabled and loaded at startup.
  3. If the agentType is stale (from an older version or a typo), migrate or recreate the agent with a supported agentType.
  4. 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

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


AI-assisted analysis of CherryHQ/cherry-studio@726446b54c (2026-08-12). Data as JSON: /api/errors/ab1b4e00b915812e. Report an issue: GitHub.