nikivdev/code · error
beads create failed: {}
Error message
beads create failed: {} What it means
Thrown when an invocation of the external `beads create` command exits non-zero. The error message embeds whichever of stderr or stdout is non-empty, so the text of this error is the tool's own diagnostic output. It surfaces external CLI failures as anyhow errors in this library's flow.
Source
Thrown at src/commit.rs:13528
.arg("--no-auto-import")
.env("BEADS_DIR", beads_dir)
.output()
.context("run br create")?;
if output.status.success() {
return Ok(true);
}
if br_create_failed_due_to_duplicate_external_ref(&output) {
return Ok(false);
}
let stderr = String::from_utf8_lossy(&output.stderr);
let stdout = String::from_utf8_lossy(&output.stdout);
let msg = if stderr.trim().is_empty() {
stdout.trim()
} else {
stderr.trim()
};
bail!("beads create failed: {}", msg);
}
fn infer_review_bead_priority(issue: &str) -> u8 {
let lower = issue.to_lowercase();
if lower.contains("secret")
|| lower.contains("credential")
|| lower.contains("api key")
|| lower.contains("injection")
|| lower.contains("vulnerability")
{
return 0; // critical
}
if lower.contains("crash")
|| lower.contains("data loss")
|| lower.contains("race condition")
|| lower.contains("buffer overflow")
{
return 1; // highView on GitHub (pinned to a747e741ae)
Solutions
- Read the embedded message — it contains beads' own stderr/stdout diagnostics
- Run the same `beads create ...` command manually to reproduce and see full output
- Check `beads --version` and that the binary is installed and on PATH
- Verify arguments (quoting of issue titles with spaces/special chars) and that beads is initialized in this repo
Defensive patterns
Strategy: try-catch
Validate before calling
// verify beads is available before calling create
if which::which("beads").is_err() {
eprintln!("beads CLI not found on PATH");
std::process::exit(1);
} Try / catch
match beads_create(&issue) {
Err(e) => {
eprintln!("beads create failed: {e:#}");
eprintln!("Check beads is installed, initialized, and the issue text is valid.");
}
Ok(_) => {}
} Prevention
- Install/keep beads on PATH and pin its version in dev docs
- Quote issue titles with spaces/special characters
- Run `beads init` in each repo that uses beads tracking
- Reproduce failures by running the same beads command manually
When it happens
Trigger: Running `beads create <issue>` via Command when the beads CLI exits with a failure status — e.g. invalid arguments, beads not installed, or beads reporting a data/database problem on stderr.
Common situations: beads binary missing or an old version on PATH, malformed issue title arguments (unescaped quotes/spaces), corrupted beads database, or running outside a directory beads is initialized in.
Related errors
- external codex browser exited unsuccessfully with status {}
- ai auto-fix failed
- claude failed: {}
- Missing profile: {}
- Could not find agent file for '{}'
AI-assisted analysis of nikivdev/code@a747e741ae (2026-09-01).
Data as JSON: /api/errors/349c127d631225dc.
Report an issue: GitHub.