{"record":{"id":"8e81d44e7836bac6","repo":"multica-ai/multica","slug":"resolve-skill-bundle-returned-wrong-skill-request","errorCode":null,"errorMessage":"resolve skill bundle returned wrong skill: requested source=%s id=%s, got source=%s id=%s","messagePattern":"resolve skill bundle returned wrong skill: requested source=(.+?) id=(.+?), got source=(.+?) id=(.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/internal/daemon/daemon.go","lineNumber":5936,"sourceCode":"// timeout, so a large bundle on a slow link is given room to finish instead of\n// being cut off mid-body. Caching on success is what lets the resolve converge\n// across dispatches. (GitHub #4505 / MUL-3650)\nfunc (d *Daemon) resolveSkillBundle(ctx context.Context, task *Task, ref SkillRefData) (SkillData, error) {\n\treqCtx, cancel := context.WithTimeout(ctx, skillBundleResolveTimeout(ref.SizeBytes))\n\tdefer cancel()\n\n\tbundle, err := d.client.ResolveSkillBundle(reqCtx, task.RuntimeID, task.ID, ref)\n\tif err != nil {\n\t\treturn SkillData{}, err\n\t}\n\t// The resolve endpoint serves the agent's *current* bundle and hash, which\n\t// may differ from the claim-time ref when the skill was edited between\n\t// claim and prepare (see ResolveTaskSkillBundles). So confirm only that the\n\t// server returned the skill we asked for (source/id), then validate the\n\t// bundle for self-consistency against a ref derived from itself — pinning\n\t// it to the possibly-stale requested hash would reject a legitimate update.\n\tif bundle.Source != ref.Source || bundle.ID != ref.ID {\n\t\treturn SkillData{}, fmt.Errorf(\"resolve skill bundle returned wrong skill: requested source=%s id=%s, got source=%s id=%s\", ref.Source, ref.ID, bundle.Source, bundle.ID)\n\t}\n\tbundleRef := skillRefFromBundle(bundle)\n\tvalidationRef := bundleRef\n\tif ref.Source == skillbundle.SourcePlugin {\n\t\tvalidationRef = ref\n\t}\n\tif !validateSkillBundle(validationRef, bundle) {\n\t\treturn SkillData{}, fmt.Errorf(\"resolve skill bundle returned invalid bundle: skill_id=%s source=%s hash=%s\", bundle.ID, bundle.Source, bundle.Hash)\n\t}\n\tif err := d.skillCache.WithRefLock(task.WorkspaceID, validationRef, func() error {\n\t\treturn d.skillCache.Store(task.WorkspaceID, bundle)\n\t}); err != nil {\n\t\treturn SkillData{}, fmt.Errorf(\"store skill bundle cache: %w\", err)\n\t}\n\treturn bundle, nil\n}\n\nconst (","sourceCodeStart":5918,"sourceCodeEnd":5954,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/internal/daemon/daemon.go#L5918-L5954","documentation":"Error \"resolve skill bundle returned wrong skill: requested source=%s id=%s, got source=%s id=%s\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/internal/daemon/daemon.go:5936 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Clear the skill bundle cache and retry; report the mismatch if it persists."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}