multica-ai/multica · warning
--content, --content-stdin, or --content-file is required
Error message
--content, --content-stdin, or --content-file is required
What it means
`multica issue comment add` requires a comment body from one of three sources: --content (inline string), --content-stdin (piped input), or --content-file (path). resolveTextFlag found none of them set, so the command aborts before contacting the server.
Source
Thrown at server/cmd/multica/cmd_issue.go:1959
strVal(c, "id"),
parentID,
actors.actor(strVal(c, "author_type"), strVal(c, "author_id")),
strVal(c, "type"),
content,
created,
})
}
cli.PrintTable(os.Stdout, headers, rows)
return nil
}
func runIssueCommentAdd(cmd *cobra.Command, args []string) error {
content, hasContent, err := resolveTextFlag(cmd, "content")
if err != nil {
return err
}
if !hasContent {
return fmt.Errorf("--content, --content-stdin, or --content-file is required")
}
if err := guardLocalPathLinks(content, "comment body",
"Deliver the file itself with `multica issue comment add <issue-id> --attachment <path>` (repeatable) and drop the link."); err != nil {
return err
}
client, err := newAPIClient(cmd)
if err != nil {
return err
}
// Use a longer timeout when attachments are present (file uploads can be slow).
timeout := cli.APITimeout()
attachments, _ := cmd.Flags().GetStringSlice("attachment")
if len(attachments) > 0 {
timeout = cli.AtLeastAPITimeout(60 * time.Second)
}
ctx, cancel := context.WithTimeout(context.Background(), timeout)View on GitHub (pinned to 2c0912b6ec)
Solutions
- Pass the body inline: --content "text".
- Pipe it: echo "text" | multica issue comment add <issue> --content-stdin.
- Or use --content-file <path> with an existing non-empty file.
Example fix
# before multica issue comment add ISS-1 # after echo "Looks fixed to me" | multica issue comment add ISS-1 --content-stdin
Defensive patterns
Strategy: validation
Validate before calling
# bash: guarantee a body before invoking the CLI if [[ -z "$CONTENT" && -z "$CONTENT_FILE" && -t stdin ]]; then echo "refusing: no --content, --content-stdin, or --content-file" >&2 exit 2 fi if [[ -n "$CONTENT_FILE" && ! -s "$CONTENT_FILE" ]]; then echo "refusing: $CONTENT_FILE is empty" >&2; exit 2 fi
Prevention
- Fail fast in scripts when the content variable expands to empty.
- Prefer --content-file for templated bodies; check the file is non-empty first.
When it happens
Trigger: Running `multica issue comment add <issue>` with no --content/--content-stdin/--content-file; passing an empty string to --content also counts as unset.
Common situations: Building the command in a script where the content variable is empty; intending to pipe but forgetting --content-stdin; pointing --content-file at a missing file so the flag resolves to nothing.
Related errors
- --kind must be schedule or webhook
- --cron is required for --kind schedule
- --timezone is only valid with --kind schedule
- --cron is only valid with --kind schedule
- no fields to update; use --enabled, --cron, --timezone, or -
AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15).
Data as JSON: /api/errors/dd330e58ccefc44e.
Report an issue: GitHub.