gastownhall/beads · error
empty description from stdin/file requires --allow-empty-des
Error message
empty description from stdin/file requires --allow-empty-description (or use an explicit inline empty value like --description "")
What it means
When a description update sources its body from stdin or a file and the resulting text is empty, bd refuses to wipe the description silently. The caller must opt in with --allow-empty-description, or pass an explicit inline empty value, to make the intent unambiguous.
Source
Thrown at cmd/bd/update_description_guard.go:47
message, _ := cmd.Flags().GetString("message")
if message == "-" {
return true
}
}
return false
}
func validateDescriptionUpdate(cmd *cobra.Command, description string, descChanged bool) error {
if !descChanged || description != "" || !descriptionUsesExternalInput(cmd) {
return nil
}
allowEmptyDescription, _ := cmd.Flags().GetBool("allow-empty-description")
if allowEmptyDescription {
return nil
}
return fmt.Errorf("empty description from stdin/file requires --allow-empty-description (or use an explicit inline empty value like --description \"\")")
}
View on GitHub (pinned to 71377f2769)
Solutions
- Verify the stdin/file actually contains the intended text
- Add --allow-empty-description if clearing the description is intentional
- Or pass an explicit inline empty value: --description ""
Example fix
// before bd update bd-42 --description-file notes.md # notes.md is empty // after bd update bd-42 --description-file notes.md --allow-empty-description
Defensive patterns
Strategy: validation
Validate before calling
if descChanged && description == "" && usesStdinOrFile(cmd) && !allowEmpty {
return errors.New("refusing empty description from stdin/file; pass --allow-empty-description to confirm")
} Prevention
- Check that stdin/file input is non-empty before piping
- Pass --allow-empty-description only when clearing is intentional
- Prefer explicit inline --description "" to signal deliberate clearing
When it happens
Trigger: `bd update <id> --description-file empty.md`, `cat x | bd update <id> --stdin`, or `--description -` where the piped file/stream is empty, without --allow-empty-description.
Common situations: Empty or mis-pathed body file; a build script piping output that produced nothing; CI env where the file wasn't generated; accidentally redirecting an empty stream intending to clear the description.
Related errors
- got %d close reasons for %d issue IDs; provide exactly one s
- cannot specify both --reason-file and --reason/--resolution/
- --reason-file %q is empty; close reason is required
- invalid mode '%s', must be 'compile' or 'runtime'
- runtime mode requires all variables to have values Missing:
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/ddcc08fa54527354.
Report an issue: GitHub.