Tencent/WeKnora · error · ErrSandboxConfigCordoned
ErrSandboxConfigCordoned
ErrSandboxConfigCordoned
Error message
%w: %s
What it means
After loading a workspace sandbox config, Resolve checks resolved.Cordoned. A cordoned config is administratively disabled (e.g. pending review or quarantined) and must not be used, so Resolve returns this sentinel-wrapped error (ErrSandboxConfigCordoned) with the config ID.
Source
Thrown at internal/sandbox/tenant_resolver.go:171
ctx context.Context,
tenantID uint64,
configID string,
) (Manager, error) {
if strings.TrimSpace(configID) == "" ||
configID == types.SandboxConfigIDGlobalDefault {
return NewDisabledManager(), nil
}
resolved, err := r.deps.Loader.Load(ctx, tenantID, configID)
if err != nil {
return nil, fmt.Errorf(
"sandbox: load workspace %d config %q: %w", tenantID, configID, err)
}
if !resolved.Found {
return nil, fmt.Errorf("%w: %s", ErrSandboxConfigNotFound, configID)
}
if resolved.Cordoned {
return nil, fmt.Errorf("%w: %s", ErrSandboxConfigCordoned, configID)
}
effective, err := ResolveEffectiveConfig(resolved.Config, r.deps.GlobalConfig)
if err != nil {
return nil, err
}
if err := EnsureDockerBackendAllowed(effective.Type); err != nil {
return nil, err
}
switch effective.Type {
case SandboxTypeDisabled:
return NewDisabledManager(), nil
case SandboxTypeCube, SandboxTypeE2B, SandboxTypeDocker:
client, err := r.buildClient(effective)
if err != nil {
return nil, err
}View on GitHub (pinned to 988cbb0330)
Solutions
- Ask an administrator to uncordon the config, or pick a different, active config ID.
- Check errors.Is(err, sandbox.ErrSandboxConfigCordoned) and route to a fallback/default sandbox config.
- Surface a clear status to the tenant that their sandbox config is temporarily disabled.
Example fix
// before
cfg, err := resolver.Resolve(ctx, tenantID, cfgID)
return cfg, err
// after
cfg, err := resolver.Resolve(ctx, tenantID, cfgID)
if errors.Is(err, sandbox.ErrSandboxConfigCordoned) {
return resolver.Resolve(ctx, tenantID, fallbackConfigID)
} Defensive patterns
Strategy: try-catch
Validate before calling
// query the config's status before resolving
st, _ := client.GetWorkspaceConfigStatus(ctx, tenantID, configID)
if st == "cordoned" { /* switch to fallback config */ } Try / catch
cfg, err := resolver.Resolve(ctx, tenantID, configID)
if errors.Is(err, sandbox.ErrSandboxConfigCordoned) {
return resolver.Resolve(ctx, tenantID, fallbackConfigID)
}
if err != nil { return err } Prevention
- Maintain an always-active fallback config per tenant.
- Monitor cordoned configs and alert the owning team.
- Check config status in health checks, not only at request time.
When it happens
Trigger: Calling Resolve on a tenantID/configID whose stored config row has the cordoned flag set — regardless of the config's contents being otherwise valid.
Common situations: Ops team cordoning a config due to a security incident or bad template; environments (staging/prod) sharing a database where a config was cordoned elsewhere; automated pipelines still referencing a cordoned config.
Related errors
- ErrSandboxConfigNotFound
- custom agent configuration is required for agent QA
- summary model (model_id) is not configured in custom agent s
- rerank model is not configured: please set rerank_model_id o
- JWKS document contains no keys
AI-assisted analysis of Tencent/WeKnora@988cbb0330 (2026-09-02).
Data as JSON: /api/errors/fec1ba63cb852acc.
Report an issue: GitHub.