sipeed/picoclaw · error

windows isolation does not yet support expose_paths filesyst

Error message

windows isolation does not yet support expose_paths filesystem rules

What it means

validateWindowsExposePaths returns this error whenever isolation.expose_paths is non-empty and the platform is Windows. The Windows backend currently enforces restricted token, low integrity and job-object limits only — it has no filesystem remapping for expose rules (see the note logged in platform_windows.go), so configuring any expose_paths entry on Windows aborts preflight rather than silently ignoring the rules.

Source

Thrown at pkg/isolation/runtime.go:304

}

// BuildWindowsAccessRules derives the host-path access policy used by the
// Windows restricted-token backend.
func BuildWindowsAccessRules(root string, overrides []config.ExposePath) []AccessRule {
	merged := MergeExposePaths(nil, overrides)
	rules := make([]AccessRule, 0, len(merged)+1)
	rules = append(rules, AccessRule{Path: root, Mode: "rw"})
	for _, item := range merged {
		rules = append(rules, AccessRule{Path: item.Source, Mode: item.Mode})
	}
	return rules
}

func validateWindowsExposePaths(items []config.ExposePath) error {
	if len(items) == 0 {
		return nil
	}
	return fmt.Errorf("windows isolation does not yet support expose_paths filesystem rules")
}

// IsSupported reports whether the current platform has an implemented isolation
// backend.
func IsSupported() bool {
	return isSupportedOn(runtime.GOOS)
}

func isSupportedOn(goos string) bool {
	switch goos {
	case "linux", "windows":
		return true
	default:
		return false
	}
}

// Preflight validates the configured isolation state and prepares the instance

View on GitHub (pinned to 49183d7e8d)

Solutions

  1. Remove expose_paths from the config used on Windows hosts
  2. Maintain per-OS config files/overrides so only Linux configs carry expose rules
  3. Track the feature and re-enable once the Windows backend implements path exposure
  4. If the paths must be reachable, rely on the instance root rw rule the backend already creates instead of expose_paths

Example fix

# before (config used on Windows)
isolation:
  enabled: true
  expose_paths:
    - {source: D:\work, mode: rw}

# after
isolation:
  enabled: true
  expose_paths: []
Defensive patterns

Strategy: validation

Validate before calling

// strip expose rules when generating config for windows hosts
if runtime.GOOS == "windows" && len(cfg.Isolation.ExposePaths) > 0 {
    return fmt.Errorf("expose_paths is linux-only; config for windows must not define it")
}

Try / catch

if err := isolation.Preflight(); err != nil {
    if runtime.GOOS == "windows" && strings.Contains(err.Error(), "does not yet support expose_paths") {
        // config drift: windows host picked up linux isolation config
        return fmt.Errorf("remove expose_paths from windows config: %w", err)
    }
    return err
}

Prevention

When it happens

Trigger: Enabling isolation on a Windows host with any expose_paths entry in the config — the check is a hard platform gate in Preflight (validateWindowsExposePaths receives the merged ExposePaths and errors if len(items) > 0).

Common situations: A config authored and validated on Linux carried over to a Windows deployment; CI matrix runs hitting the Windows leg; users assuming cross-platform parity of isolation features.

Related errors


AI-assisted analysis of sipeed/picoclaw@49183d7e8d (2026-08-15). Data as JSON: /api/errors/1fac62092204bfd7. Report an issue: GitHub.