{"record":{"id":"5471b2dec5f3c049","repo":"multica-ai/multica","slug":"subscriber-q-resolved-to-s-autopilot-subscriber","errorCode":null,"errorMessage":"subscriber %q resolved to %s; autopilot subscribers must be members","messagePattern":"subscriber %q resolved to (.+?); autopilot subscribers must be members","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_autopilot.go","lineNumber":754,"sourceCode":"\t}\n\tfmt.Printf(\"Trigger %s deleted.\\n\", triggerRef.ID)\n\treturn nil\n}\n\nfunc resolveAutopilotSubscriberInputs(ctx context.Context, client *cli.APIClient, refs []string) ([]map[string]string, error) {\n\tinputs := make([]map[string]string, 0, len(refs))\n\tseen := map[string]struct{}{}\n\tmemberOnly := assigneeKinds{member: true}\n\tfor _, ref := range refs {\n\t\tif strings.TrimSpace(ref) == \"\" {\n\t\t\treturn nil, fmt.Errorf(\"--subscriber cannot be empty\")\n\t\t}\n\t\tuserType, userID, err := resolveAssignee(ctx, client, ref, memberOnly)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"resolve subscriber %q: %w\", ref, err)\n\t\t}\n\t\tif userType != \"member\" {\n\t\t\treturn nil, fmt.Errorf(\"subscriber %q resolved to %s; autopilot subscribers must be members\", ref, userType)\n\t\t}\n\t\tif _, ok := seen[userID]; ok {\n\t\t\tcontinue\n\t\t}\n\t\tseen[userID] = struct{}{}\n\t\tinputs = append(inputs, map[string]string{\n\t\t\t\"user_type\": \"member\",\n\t\t\t\"user_id\":   userID,\n\t\t})\n\t}\n\treturn inputs, nil\n}\n\n// ---------------------------------------------------------------------------\n// Helpers\n// ---------------------------------------------------------------------------\n\n// uuidRegexp matches a canonical UUID (8-4-4-4-12 hex).","sourceCodeStart":736,"sourceCodeEnd":772,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_autopilot.go#L736-L772","documentation":"resolveAutopilotSubscriberInputs restricts autopilot subscribers to real members. Even though resolveAssignee was called with member-only kinds, this guard re-checks the returned userType and rejects anything that resolved to a non-member type (e.g. an agent or team identity).","triggerScenarios":"Passing a reference that resolves to an agent or team user_type, e.g. `--subscriber <agent-name>` when an agent with that name exists in the workspace, or a ref whose lookup path returns a team identity.","commonSituations":"Confusing agent names with member names (an agent named 'reviewer' and a member named 'reviewer'); migrating subscribers from a system where teams could subscribe; assuming any assignee-shaped reference is valid.","solutions":["Replace the offending reference with a workspace member's email or member ID.","List members to find the correct reference: `multica member list` (or the workspace members API).","If you intended an agent on the trigger, use the trigger's agent field (--agent), not --subscriber."],"exampleFix":"# before (agent name used as subscriber)\nmultica autopilot trigger create --name t1 --agent triage-bot --subscriber triage-bot\n# after\nmultica autopilot trigger create --name t1 --agent triage-bot --subscriber \"owner@example.com\"","handlingStrategy":"validation","validationCode":"# only pass refs that appear in the member list (agents/teams excluded)\nmultica member list --output json | jq -e --arg s \"$SUB\" '.[] | select(.user_type == \"member\") | select(.email == $s or .id == $s)' >/dev/null \\\n  || { echo \"$SUB is not a member\" >&2; exit 2; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep a single source of member emails in automation config; never reuse agent names as subscriber refs.","When a name is ambiguous between an agent and a member, prefer the member's email or UUID."],"tags":["cli","validation","autopilot","authorization","go"],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}