{"record":{"id":"1cd6009b882042d6","repo":"dagger/dagger","slug":"arg-q-w-1cd600","errorCode":null,"errorMessage":"arg %q: %w","messagePattern":"arg %q: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"dagql/call_request_input.go","lineNumber":170,"sourceCode":"\t\t}\n\t\tframe.Receiver = receiverRef\n\t}\n\tif mod := id.Module(); mod != nil {\n\t\tmodRef, err := resultCallRefFromIDInput(ctx, mod.ID(), memo)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"module: %w\", err)\n\t\t}\n\t\tframe.Module = &ResultCallModule{\n\t\t\tResultRef: modRef,\n\t\t\tName:      mod.Name(),\n\t\t\tRef:       mod.Ref(),\n\t\t\tPin:       mod.Pin(),\n\t\t}\n\t}\n\tfor _, arg := range id.Args() {\n\t\tconverted, err := resultCallArgFromRecipeArgument(ctx, arg, memo)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"arg %q: %w\", arg.Name(), err)\n\t\t}\n\t\tframe.Args = append(frame.Args, converted)\n\t}\n\tfor _, input := range id.ImplicitInputs() {\n\t\tconverted, err := resultCallArgFromRecipeArgument(ctx, input, memo)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"implicit input %q: %w\", input.Name(), err)\n\t\t}\n\t\tframe.ImplicitInputs = append(frame.ImplicitInputs, converted)\n\t}\n\treturn frame, nil\n}\n\nfunc resultCallArgFromRecipeArgument(ctx context.Context, arg *call.Argument, memo recipeCallMemo) (*ResultCallArg, error) {\n\tif arg == nil {\n\t\treturn nil, nil\n\t}\n\tvalue, err := resultCallLiteralFromRecipeLiteral(ctx, arg.Value(), memo)","sourceCodeStart":152,"sourceCodeEnd":188,"githubUrl":"https://github.com/dagger/dagger/blob/82ba2681dbe30d3547a1dc50ea495900ab5b6047/dagql/call_request_input.go#L152-L188","documentation":"This wrapper error is returned by resultCallFromRecipeIDInput while converting each explicit argument of a recipe ID. When resultCallArgFromRecipeArgument fails for an argument (e.g. its value is a handle-form ID literal, an unsupported literal type, or a nested receiver/module failure), the error is wrapped with \"arg \\\"<name>\\\":\" to identify the offending argument.","triggerScenarios":"A recipe call ID has an argument whose literal is a call.LiteralID pointing at a handle-form ID, or whose value hits the unsupported-literal default branch during inline expansion.","commonSituations":"Passing an object obtained from a prior session or SDK cache (handle ID) as an argument to a new call; passing a newly added input type not yet handled by the literal conversion; module argument containing nested IDs.","solutions":["Read the wrapped cause to see which argument and why (handle ID vs unsupported literal)","Re-create argument objects in the current session so they carry recipe-form IDs","Check for a Dagger version mismatch between SDK and engine that produces unhandled literal types","If the arg must stay a handle, resolve it through the cache-backed path (resultCallRefFromIDInput) instead"],"exampleFix":"// before\ndag.Container().WithEnvVariable(\"CFG\", staleContainer.ID()) // handle ID arg\n// after\nfresh := dag.Container().From(\"alpine\") // same session, recipe-form ID\n_, err = dag.Container().WithEnvVariable(\"CFG\", fresh.ID())\n","handlingStrategy":"validation","validationCode":"for _, a := range id.Args() {\n    if lit, ok := a.Value().(*call.LiteralID); ok && lit.Value().IsHandle() {\n        return fmt.Errorf(\"arg %q uses handle-form ID; re-create in session\", a.Name())\n    }\n}","typeGuard":"func argIDsAreRecipeForm(id *call.ID) bool {\n    for _, a := range id.Args() {\n        if lit, ok := a.Value().(*call.LiteralID); ok && lit.Value().IsHandle() {\n            return false\n        }\n    }\n    return true\n}","tryCatchPattern":"if err != nil {\n    var name, cause string\n    if m := regexp.MustCompile(`arg \"([^\"]+)\": (.*)`).FindStringSubmatch(err.Error()); m != nil {\n        name, cause = m[1], m[2]\n        // rebuild the named argument in the current session\n    }\n}","preventionTips":["Build argument objects in the same session as the call","Avoid passing cached/stale object IDs as arguments","Keep SDK and engine versions in sync","Handle optional arguments by omission rather than stale IDs"],"tags":["dagql","arguments","id-resolution"],"backgroundTag":"id-resolution-failed","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"}