multica-ai/multica · warning

no fields to update; use --name, --description, --instructio

Error message

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>`)

What it means

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`.

Source

Thrown at server/cmd/multica/cmd_agent.go:805

	if cmd.Flags().Changed("status") {
		v, _ := cmd.Flags().GetString("status")
		body["status"] = v
	}
	if cmd.Flags().Changed("max-concurrent-tasks") {
		v, _ := cmd.Flags().GetInt32("max-concurrent-tasks")
		if err := validateAgentMaxConcurrentTasksFlag(v); err != nil {
			return err
		}
		body["max_concurrent_tasks"] = v
	}
	if mc, ok, err := resolveMcpConfig(cmd); err != nil {
		return err
	} else if ok {
		body["mcp_config"] = mc
	}

	if len(body) == 0 {
		return 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>`)")
	}

	ctx, cancel := cli.APIContext(context.Background())
	defer cancel()

	var result map[string]any
	if err := client.PutJSON(ctx, "/api/agents/"+args[0], body, &result); err != nil {
		return fmt.Errorf("update agent: %w", err)
	}

	output, _ := cmd.Flags().GetString("output")
	if output == "json" {
		return cli.PrintJSON(os.Stdout, result)
	}

	fmt.Printf("Agent updated: %s (%s)\n", strVal(result, "name"), strVal(result, "id"))
	return nil
}

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. Add at least one updatable flag to the command, e.g. `multica agent update <id> --status active`
  2. For environment variables use the dedicated subcommand: `multica agent env set <id> KEY=value`
  3. In scripts, guard so you skip the update call entirely when no flags would be set

Example fix

# before
multica agent update agt_1
# Error: no fields to update; use --name, ... 

# after
multica agent update agt_1 --description "primary coder"
multica agent env set agt_1 API_KEY=xyz
Defensive patterns

Strategy: validation

Validate before calling

# only invoke update when at least one field flag is present
if [ -n "$NAME$DESC$STATUS" ]; then
  multica agent update "$AGENT_ID" ${NAME:+--name "$NAME"} ${DESC:+--description "$DESC"} ${STATUS:+--status "$STATUS"}
else
  echo 'nothing to update; skipping'
fi

Try / catch

if len(body) == 0 {
	return fmt.Errorf("no fields to update; use --name, --description, ...")
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15). Data as JSON: /api/errors/aa4d6530bbd992f5. Report an issue: GitHub.