dagger/dagger · error
SDKs are not env-scoped; uninstall SDKs in the base workspac
Error message
SDKs are not env-scoped; uninstall SDKs in the base workspace config
What it means
Policy guard in withoutSDK: an SDK uninstall was attempted while a workspace environment was selected. SDKs are not env-scoped — they are installed and removed only in the base workspace config — so the request is rejected instead of writing an env overlay.
Source
Thrown at core/schema/workspace_builders.go:435
if len(env.Modules) == 0 {
env.Modules = nil
}
}
staged.Config.Env[envName] = env
updated, err := workspace.UpdateConfigBytes(staged.Data, staged.Config)
if err != nil {
return dagql.ObjectResult[*core.Workspace]{}, err
}
return s.stageWorkspaceConfigBytes(ctx, parent, staged, updated)
}
func (s *workspaceSchema) withoutSDK(
ctx context.Context,
parent dagql.ObjectResult[*core.Workspace],
args workspaceUninstallArgs,
) (dagql.ObjectResult[*core.Workspace], error) {
if _, ok := selectedWorkspaceEnv(ctx); ok {
return dagql.ObjectResult[*core.Workspace]{}, fmt.Errorf("SDKs are not env-scoped; uninstall SDKs in the base workspace config")
}
return s.withoutModule(ctx, parent, args)
}
func (s *workspaceSchema) workspaceWithChangeset(
ctx context.Context,
parent dagql.ObjectResult[*core.Workspace],
changes dagql.ObjectResult[*core.Changeset],
) (dagql.ObjectResult[*core.Workspace], error) {
if changes.Self() == nil {
return parent, nil
}
changesID, err := changes.ID()
if err != nil {
return dagql.ObjectResult[*core.Workspace]{}, err
}
srv, err := core.CurrentDagqlServer(ctx)
if err != nil {View on GitHub (pinned to 82ba2681db)
Solutions
- Clear the environment selection before uninstalling the SDK
- Remove the SDK entry from the base workspace config
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at core/schema/workspace_builders.go:435 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/dbd9583eb510429f.
Report an issue: GitHub.