{"record":{"id":"201134a7944c870a","repo":"larksuite/cli","slug":"args-field-s-arg-local-cannot-declare-public-i","errorCode":null,"errorMessage":"Args field %s: arg:\"local\" cannot declare public input tags","messagePattern":"Args field (.+?): arg:\"local\" cannot declare public input tags","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"shortcuts/common/typed_compile_args.go","lineNumber":106,"sourceCode":"\t\t}\n\t\tflagName, hasFlag := field.Tag.Lookup(\"flag\")\n\t\targMode, hasArg := field.Tag.Lookup(\"arg\")\n\t\tif hasFlag == hasArg {\n\t\t\treturn fmt.Errorf(\"Args field %s must declare exactly one of flag or arg\", field.Name)\n\t\t}\n\t\tif _, duplicate := seenGo[field.Name]; duplicate {\n\t\t\treturn fmt.Errorf(\"Args field %s is duplicated through inline expansion\", field.Name)\n\t\t}\n\t\tseenGo[field.Name] = struct{}{}\n\t\tindex := append(append([]int(nil), parentIndex...), i)\n\t\tif hasArg {\n\t\t\tswitch argMode {\n\t\t\tcase \"local\":\n\t\t\t\tif insideInline {\n\t\t\t\t\treturn fmt.Errorf(\"Args field %s: arg:\\\"local\\\" is not allowed inside inline\", field.Name)\n\t\t\t\t}\n\t\t\t\tif hasAnyTag(field, \"flag\", \"schema\", \"cli\", \"doc\", \"json\") {\n\t\t\t\t\treturn fmt.Errorf(\"Args field %s: arg:\\\"local\\\" cannot declare public input tags\", field.Name)\n\t\t\t\t}\n\t\t\tcase \"inline\":\n\t\t\t\tif insideInline {\n\t\t\t\t\treturn fmt.Errorf(\"Args field %s: nested arg:\\\"inline\\\" is not allowed\", field.Name)\n\t\t\t\t}\n\t\t\t\tinlineType := field.Type\n\t\t\t\tif inlineType.Kind() == reflect.Pointer {\n\t\t\t\t\treturn fmt.Errorf(\"Args field %s: arg:\\\"inline\\\" must be a struct value, not pointer\", field.Name)\n\t\t\t\t}\n\t\t\t\tif inlineType.Kind() != reflect.Struct {\n\t\t\t\t\treturn fmt.Errorf(\"Args field %s: arg:\\\"inline\\\" must be a struct, got %s\", field.Name, field.Type)\n\t\t\t\t}\n\t\t\t\tif hasAnyTag(field, \"flag\", \"schema\", \"cli\", \"doc\", \"json\") {\n\t\t\t\t\treturn fmt.Errorf(\"Args field %s: arg:\\\"inline\\\" cannot declare public input tags\", field.Name)\n\t\t\t\t}\n\t\t\t\tif err := collectArgFields(inlineType, index, true, out, seenGo, supplements); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/larksuite/cli/blob/7fd6ef3c07182257ce776cdc5a614e122d5bd4b3/shortcuts/common/typed_compile_args.go#L88-L124","documentation":"Compile-time guard: a field with arg:\"local\" also declares public input tags (flag/schema/cli/doc/json), which is contradictory since local args are never surfaced as public input.","triggerScenarios":"Thrown at shortcuts/common/typed_compile_args.go:106 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the public tags from the local field, or drop arg:\"local\""],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7fd6ef3c07182257ce776cdc5a614e122d5bd4b3","analyzedAt":"2026-09-04T21:17:44.649Z","contentChangedAt":"2026-09-04T21:17:44.649Z","schemaVersion":2},"datasetVersion":"2026-09-12T02:17:10.037Z"}