{"record":{"id":"8d277449e434f771","repo":"dagger/dagger","slug":"cannot-resolve-result-ref-d-without-cache","errorCode":null,"errorMessage":"cannot resolve result ref %d without cache","messagePattern":"cannot resolve result ref (.+?) without cache","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"dagql/result_call_frame.go","lineNumber":676,"sourceCode":"func (frame *ResultCall) receiverCall(c *Cache) (*ResultCall, error) {\n\tif frame == nil || frame.Receiver == nil {\n\t\treturn nil, nil\n\t}\n\treturn frame.refCall(c, frame.Receiver)\n}\n\nfunc (frame *ResultCall) refCall(c *Cache, ref *ResultCallRef) (*ResultCall, error) {\n\tif err := ref.Validate(); err != nil {\n\t\treturn nil, err\n\t}\n\tif ref.Call != nil {\n\t\treturn ref.Call, nil\n\t}\n\tif target := ref.loadSharedCall(); target != nil {\n\t\treturn target, nil\n\t}\n\tif c == nil {\n\t\treturn nil, fmt.Errorf(\"cannot resolve result ref %d without cache\", ref.ResultID)\n\t}\n\ttarget := c.resultCallByResultID(sharedResultID(ref.ResultID))\n\tif target == nil {\n\t\treturn nil, fmt.Errorf(\"missing result call frame for shared result %d\", ref.ResultID)\n\t}\n\treturn target, nil\n}\n\nfunc (frame *ResultCall) recipeDigestWithVisiting(c *Cache, visiting map[sharedResultID]struct{}) (digest.Digest, error) {\n\tif frame == nil {\n\t\treturn \"\", nil\n\t}\n\n\tframe.recipeDigestOnce.Do(func() {\n\t\tfield, err := resultCallIdentityField(frame)\n\t\tif err != nil {\n\t\t\tframe.recipeDigestErr = err\n\t\t\treturn","sourceCodeStart":658,"sourceCodeEnd":694,"githubUrl":"https://github.com/dagger/dagger/blob/82ba2681dbe30d3547a1dc50ea495900ab5b6047/dagql/result_call_frame.go#L658-L694","documentation":"Returned by ResultCall.refCall when a ResultCallRef carries only a numeric ResultID, no inline Call, no live shared call, and the cache argument is nil. Resolving an ID-based ref requires looking up the shared result in the Cache, so a nil cache makes the ref unresolvable — usually the caller forgot to thread EngineCache through.","triggerScenarios":"Thrown at dagql/result_call_frame.go:676 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass the engine cache (EngineCache(ctx)) into refCall/receiverCall","Materialize the ref with an inline Call before the cache is gone","Ensure resolution happens while the session cache is still alive"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"82ba2681dbe30d3547a1dc50ea495900ab5b6047","analyzedAt":"2026-09-05T07:21:37.930Z","contentChangedAt":"2026-09-05T07:21:37.930Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}