dagger/dagger · error

decode persisted container withoutLabel lazy payload: %w

Error message

decode persisted container withoutLabel lazy payload: %w

What it means

In the persisted-Container decoder, the withoutLabel lazy case unmarshals its stored JSON payload into persistedContainerWithoutLabelLazy. This error fires when the payload is malformed or written by an incompatible schema version, blocking restoration of that Container step.

Source

Thrown at core/container.go:4470

		var persisted persistedContainerWithLabelLazy
		if err := json.Unmarshal(payload, &persisted); err != nil {
			return fmt.Errorf("decode persisted container withLabel lazy payload: %w", err)
		}
		parent, err := loadPersistedObjectResultByResultID[*Container](ctx, dag, persisted.ParentResultID, "container withLabel parent")
		if err != nil {
			return err
		}
		container.Lazy = &ContainerWithLabelLazy{
			LazyState: NewLazyState(),
			Parent:    parent,
			Name:      persisted.Name,
			Value:     persisted.Value,
		}
		return nil
	case "withoutLabel":
		var persisted persistedContainerWithoutLabelLazy
		if err := json.Unmarshal(payload, &persisted); err != nil {
			return fmt.Errorf("decode persisted container withoutLabel lazy payload: %w", err)
		}
		parent, err := loadPersistedObjectResultByResultID[*Container](ctx, dag, persisted.ParentResultID, "container withoutLabel parent")
		if err != nil {
			return err
		}
		container.Lazy = &ContainerWithoutLabelLazy{
			LazyState: NewLazyState(),
			Parent:    parent,
			Name:      persisted.Name,
		}
		return nil
	case "__withImageConfigMetadata":
		var persisted persistedContainerWithImageConfigMetadataLazy
		if err := json.Unmarshal(payload, &persisted); err != nil {
			return fmt.Errorf("decode persisted container withImageConfigMetadata lazy payload: %w", err)
		}
		parent, err := loadPersistedObjectResultByResultID[*Container](ctx, dag, persisted.ParentResultID, "container withImageConfigMetadata parent")
		if err != nil {

View on GitHub (pinned to 82ba2681db)

Solutions

  1. Validate the payload's parentResultID and name fields
  2. Invalidate and re-derive the stale persisted object
  3. Escalate if reproducible on freshly persisted data
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at core/container.go:4470 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/396b7486d6bd539e. Report an issue: GitHub.