dagger/dagger · error
no runtime implemented
Error message
no runtime implemented
What it means
Module.LoadRuntime requires the module's SDK to implement the ModuleRuntime interface. AsRuntime() returns false when the SDK config (e.g. a config-only or static SDK) does not provide a runtime implementation, so Dagger cannot instantiate code execution for this module and throws 'no runtime implemented'.
Source
Thrown at core/module.go:2173
ifaceID, err := ResultIDInput(updatedIface)
if err != nil {
return fmt.Errorf("patched interface typedef id: %w", err)
}
if err := dag.Select(ctx, iface, &mod.InterfaceDefs[i], dagql.Selector{
Field: "__withInterfaceTypeDef",
Args: []dagql.NamedInput{{Name: "interfaceTypeDef", Value: ifaceID}},
}); err != nil {
return fmt.Errorf("patch interface typedef enum defaults: %w", err)
}
}
}
return nil
}
func (mod *Module) LoadRuntime(ctx context.Context) (ModuleRuntime, error) {
runtimeImpl, ok := mod.Source.Value.Self().SDKImpl.AsRuntime()
if !ok {
return nil, fmt.Errorf("no runtime implemented")
}
if !mod.Source.Valid {
return nil, fmt.Errorf("no source")
}
runtime, err := runtimeImpl.Runtime(ctx, mod.Deps, mod.Source.Value)
if err != nil {
return nil, fmt.Errorf("failed to load runtime: %w", err)
}
return runtime, nil
}
/*
Mod is a module in loaded into the server's DAG of modules; it's the vertex type of the DAG.
It's an interface so we can abstract over user modules and core and treat them the same.
*/View on GitHub (pinned to 82ba2681db)
Solutions
- Verify the module's dagger.json sdk field names a supported SDK (go, python, typescript, etc.) that implements ModuleRuntime
- If writing a custom SDK, implement the Runtime(ctx, deps, source) method so AsRuntime() succeeds
- Re-generate or update the module so SDKImpl is populated with a runtime-capable implementation
Example fix
// before: custom SDK missing runtime
func (s *mySDK) AsRuntime() (ModuleRuntime, bool) { return nil, false }
// after
func (s *mySDK) AsRuntime() (ModuleRuntime, bool) { return s, true }
func (s *mySDK) Runtime(ctx context.Context, deps ... , src *ModuleSource) (ModuleRuntime, error) { ... } Defensive patterns
Strategy: validation
Validate before calling
if src, err := mod.GetSource(); err == nil && src.SDKConfig != nil { /* SDK present */ }
// only proceed to LoadRuntime when the module's dagger.json sdk field is set and supported Type guard
rt, ok := mod.Source.Value.Self().SDKImpl.AsRuntime()
if !ok { return fmt.Errorf("SDK does not implement a runtime") } Try / catch
rt, err := mod.LoadRuntime(ctx)
if err != nil {
if strings.Contains(err.Error(), "no runtime implemented") {
// fall back to static/config-only handling
}
return err
} Prevention
- Always set a supported sdk entry in dagger.json
- Implement Runtime() when authoring custom SDKs
- Guard LoadRuntime calls with AsRuntime() when the SDK kind is dynamic
When it happens
Trigger: Calling Module.LoadRuntime (directly or via module loading internals) on a module whose ModuleSource resolves to an SDKImpl that does not implement Runtime — e.g. an SDK registered without a runtime, or a placeholder/sdk-config-only SDKImpl.
Common situations: Developing a custom Dagger SDK that only implements part of the ModuleRuntime interface; using an SDK kind the engine does not recognize as runnable; loading a module whose SDK field points to an unsupported or stub SDK.
Related errors
- no runtime implemented
- failed to load runtime: %w
- unknown type %q
- enum types must be named
- failed to find decl for object %s: %w
AI-assisted analysis of dagger/dagger@82ba2681db (2026-09-05).
Data as JSON: /api/errors/6f007e1ed6060504.
Report an issue: GitHub.