{"record":{"id":"aa4d6530bbd992f5","repo":"multica-ai/multica","slug":"no-fields-to-update-use-name-description","errorCode":null,"errorMessage":"no fields to update; use --name, --description, --instructions, --runtime-id, --runtime-config, --model, --thinking-level, --service-tier, --custom-args, --mcp-config, --visibility, --status, or --max-concurrent-tasks (env vars now live behind `multica agent env set <id>`)","messagePattern":"no fields to update; use --name, --description, --instructions, --runtime-id, --runtime-config, --model, --thinking-level, --service-tier, --custom-args, --mcp-config, --visibility, --status, or --max-concurrent-tasks \\(env vars now live behind `multica agent env set <id>`\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"server/cmd/multica/cmd_agent.go","lineNumber":805,"sourceCode":"\tif cmd.Flags().Changed(\"status\") {\n\t\tv, _ := cmd.Flags().GetString(\"status\")\n\t\tbody[\"status\"] = v\n\t}\n\tif cmd.Flags().Changed(\"max-concurrent-tasks\") {\n\t\tv, _ := cmd.Flags().GetInt32(\"max-concurrent-tasks\")\n\t\tif err := validateAgentMaxConcurrentTasksFlag(v); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tbody[\"max_concurrent_tasks\"] = v\n\t}\n\tif mc, ok, err := resolveMcpConfig(cmd); err != nil {\n\t\treturn err\n\t} else if ok {\n\t\tbody[\"mcp_config\"] = mc\n\t}\n\n\tif len(body) == 0 {\n\t\treturn fmt.Errorf(\"no fields to update; use --name, --description, --instructions, --runtime-id, --runtime-config, --model, --thinking-level, --service-tier, --custom-args, --mcp-config, --visibility, --status, or --max-concurrent-tasks (env vars now live behind `multica agent env set <id>`)\")\n\t}\n\n\tctx, cancel := cli.APIContext(context.Background())\n\tdefer cancel()\n\n\tvar result map[string]any\n\tif err := client.PutJSON(ctx, \"/api/agents/\"+args[0], body, &result); err != nil {\n\t\treturn fmt.Errorf(\"update agent: %w\", err)\n\t}\n\n\toutput, _ := cmd.Flags().GetString(\"output\")\n\tif output == \"json\" {\n\t\treturn cli.PrintJSON(os.Stdout, result)\n\t}\n\n\tfmt.Printf(\"Agent updated: %s (%s)\\n\", strVal(result, \"name\"), strVal(result, \"id\"))\n\treturn nil\n}","sourceCodeStart":787,"sourceCodeEnd":823,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_agent.go#L787-L823","documentation":"Returned by `multica agent update` when none of the updatable flags (--name, --description, --instructions, --runtime-id, --runtime-config, --model, --thinking-level, --service-tier, --custom-args, --mcp-config, --visibility, --status, --max-concurrent-tasks) were explicitly changed on the command line. The CLI builds the PATCH-like body only from flags where cmd.Flags().Changed() is true; an empty body aborts before the PUT. The message also notes that env vars moved to `multica agent env set`.","triggerScenarios":"Running `multica agent update <id>` with no flags, or with only flags that are not in the updatable set (e.g. --output json), or repeating a flag whose value equals the current one but relying on defaults instead of passing it explicitly.","commonSituations":"User intends an env-var change and uses a legacy --env flag that no longer updates; user inspects an agent with `update <id> --output json` expecting a no-op read; script passes flags conditionally and all conditions evaluate false.","solutions":["Add at least one updatable flag to the command, e.g. `multica agent update <id> --status active`","For environment variables use the dedicated subcommand: `multica agent env set <id> KEY=value`","In scripts, guard so you skip the update call entirely when no flags would be set"],"exampleFix":"# before\nmultica agent update agt_1\n# Error: no fields to update; use --name, ... \n\n# after\nmultica agent update agt_1 --description \"primary coder\"\nmultica agent env set agt_1 API_KEY=xyz","handlingStrategy":"validation","validationCode":"# only invoke update when at least one field flag is present\nif [ -n \"$NAME$DESC$STATUS\" ]; then\n  multica agent update \"$AGENT_ID\" ${NAME:+--name \"$NAME\"} ${DESC:+--description \"$DESC\"} ${STATUS:+--status \"$STATUS\"}\nelse\n  echo 'nothing to update; skipping'\nfi","typeGuard":null,"tryCatchPattern":"if len(body) == 0 {\n\treturn fmt.Errorf(\"no fields to update; use --name, --description, ...\")\n}","preventionTips":["Skip the update call when no updatable flags would be set","Remember env vars are managed via `multica agent env set`, not agent update","Pass --output json only alongside at least one real field flag"],"tags":["cli","usage","validation","agent"],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}