dagger/dagger · error
workspace has no client ID
Error message
workspace has no client ID
What it means
Guard in withModuleSourceWorkspaceClientContext: host access can only be restored when the workspace is bound to a client (ClientID set) or is a value workspace carrying its own filesystem. A workspace with neither cannot be used where host access is required (e.g. local dependency generation).
Source
Thrown at core/schema/modulesource.go:3461
return cycle
}
}
return nil
}
return visit(src, nil)
}
// withModuleSourceWorkspaceClientContext restores host access when a workspace
// belongs to a client. Value workspaces carry their complete filesystem value
// and therefore need no client context.
func withModuleSourceWorkspaceClientContext(ctx context.Context, workspace *core.Workspace) (context.Context, error) {
if workspace.ClientID != "" {
return withWorkspaceClientContext(ctx, workspace)
}
if workspace.IsValueWorkspace() {
return ctx, nil
}
return nil, fmt.Errorf("workspace has no client ID")
}
// generateOneLocalDependency generates the single dependency at depPath by
// running only its owning SDK's generator (looked up in owners) against a
// workspace scoped to depPath (as cwd) with the dependency's own transitive
// staging (depStaging) applied and recorded via
// __withGeneratedLocalDependencies, and returns that dependency's changeset. Returns a nil result when no SDK claims the
// dependency, so the caller skips it. Wrapped in a revealed span so the
// per-dependency generation is visible in the trace.
func (s *moduleSourceSchema) generateOneLocalDependency(
ctx context.Context,
dag *dagql.Server,
workspace dagql.ObjectResult[*core.Workspace],
depPath string,
depStaging dagql.ObjectResult[*core.Changeset],
owners map[string]string,
) (_ dagql.ObjectResult[*core.Changeset], rerr error) {
ctx, span := core.Tracer(ctx).Start(ctx, "generate local dependency: "+depPath)View on GitHub (pinned to 82ba2681db)
Solutions
- Ensure the workspace originates from a live client session with a client ID
- Materialize the workspace as a value workspace before this call
- Check the workspace wasn't constructed outside a client context
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at core/schema/modulesource.go:3461 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of dagger/dagger@82ba2681db (2026-09-05).
Data as JSON: /api/errors/a881ac08a88a6d59.
Report an issue: GitHub.