multica-ai/multica · error
command_name is required
Error message
command_name is required
What it means
validateRuntimeProfileCommandName requires a non-empty command_name on runtime profile create/update. The command is what gets exec'd for every agent using the profile, and the column has no useful default, so omitting it is rejected immediately. Related checks in the same function enforce the single-token and no-NUL rules.
Source
Thrown at server/internal/handler/runtime_profile.go:105
}
clean := make([]string, 0, len(args))
for _, a := range args {
// fixed_args are launch flags inherited by every agent on the runtime;
// blank entries are always a client mistake.
if strings.TrimSpace(a) == "" {
return nil, errors.New("fixed_args entries must be non-empty")
}
if strings.ContainsRune(a, '\x00') {
return nil, errors.New("fixed_args entries cannot contain NUL bytes")
}
clean = append(clean, a)
}
return json.Marshal(clean)
}
func validateRuntimeProfileCommandName(commandName string) error {
if commandName == "" {
return errors.New("command_name is required")
}
if strings.ContainsAny(commandName, " \t\r\n") {
return errors.New("command_name must be a single executable token; put arguments in fixed_args")
}
if strings.ContainsRune(commandName, '\x00') {
return errors.New("command_name cannot contain NUL bytes")
}
return nil
}
type createRuntimeProfileRequest struct {
DisplayName string `json:"display_name"`
ProtocolFamily string `json:"protocol_family"`
CommandName string `json:"command_name"`
Description *string `json:"description"`
FixedArgs []string `json:"fixed_args"`
Enabled *bool `json:"enabled"`
}View on GitHub (pinned to 2c0912b6ec)
Solutions
- Include a non-empty command_name, e.g. "node", "npx", "docker"
- Check whether the endpoint is full-replace — if so, always send the complete profile object on update
- Add required-field validation in the client form before submit
Example fix
// before
{ display_name: "Local runner" }
// after
{ display_name: "Local runner", command_name: "npx", fixed_args: ["-y", "some-agent"] } Defensive patterns
Strategy: validation
Validate before calling
if (!commandName || commandName.trim() === '') {
setFormError('Executable is required');
return;
} Type guard
function hasCommandName(s: unknown): s is string {
return typeof s === 'string' && s.trim().length > 0;
} Prevention
- Mark command_name required in the form schema
- Know whether the update endpoint is full-replace; always send complete objects if so
- Clone operations must copy every required field
When it happens
Trigger: POST /runtime-profiles (or PUT) with command_name missing from the JSON body, set to "", or an update payload that only patches display_name while the server expects the full object including command_name.
Common situations: Edit forms that send only changed fields against a full-replace endpoint; creation UI where the command input was left blank; scripts cloning a profile but forgetting to copy command_name.
Related errors
- fixed_args entries must be non-empty
- fixed_args entries cannot contain NUL bytes
- command_name must be a single executable token; put argument
- command_name cannot contain NUL bytes
- Invalid desktop runtime config: ${field} must use http or ht
AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15).
Data as JSON: /api/errors/f2f790c733d8fe8f.
Report an issue: GitHub.