gastownhall/beads · error
--waits-for-gate requires --waits-for (no spawner ID specifi
Error message
--waits-for-gate requires --waits-for (no spawner ID specified)
What it means
buildWaitsFor constructs the WaitsForSpec tying a new issue to a spawner parent. --waits-for-gate only configures HOW children are waited on (all-children vs any-children); it is meaningless without a spawner. When the caller explicitly passed --waits-for-gate but no --waits-for spawner ID, the CLI rejects it instead of silently ignoring the flag.
Source
Thrown at cmd/bd/create_deps.go:203
return fmt.Errorf("invalid dependency type %q (must be non-empty, max %d chars); valid types: %s",
t, types.MaxDependencyTypeLen, createDepsAcceptedTypeList())
}
if !t.IsWellKnown() {
return fmt.Errorf("unknown dependency type %q; valid types: %s",
t, createDepsAcceptedTypeList())
}
return nil
}
// buildWaitsFor validates and constructs a WaitsForSpec from the --waits-for
// and --waits-for-gate flag values. gateExplicit must be true when the caller
// explicitly passed --waits-for-gate (not relying on its default); in that case
// a missing spawnerID is rejected rather than silently ignored.
func buildWaitsFor(spawnerID, gate string, gateExplicit bool) (*domain.WaitsForSpec, error) {
spawnerID = strings.TrimSpace(spawnerID)
if spawnerID == "" {
if gateExplicit {
return nil, fmt.Errorf("--waits-for-gate requires --waits-for (no spawner ID specified)")
}
return nil, nil
}
if gate == "" {
gate = types.WaitsForAllChildren
}
if !types.IsValidWaitsForGate(gate) {
return nil, fmt.Errorf("invalid --waits-for-gate value %q (valid: all-children, any-children)", gate)
}
return &domain.WaitsForSpec{SpawnerID: spawnerID, Gate: gate}, nil
}
func discoveredFromParent(deps []string) string {
for _, raw := range deps {
raw = strings.TrimSpace(raw)
if raw == "" || !strings.Contains(raw, ":") {
continue
}View on GitHub (pinned to 71377f2769)
Solutions
- Add the spawner: pass `--waits-for <parent-or-spawner-id>` alongside --waits-for-gate
- Drop --waits-for-gate if you don't intend a waits-for relationship at all
- In wrappers, only emit --waits-for-gate when the spawner value is non-empty
Example fix
// before bd create "Child" --waits-for-gate any-children # missing spawner // after bd create "Child" --waits-for bd-parent --waits-for-gate any-children
Defensive patterns
Strategy: validation
Validate before calling
if gate != "" && spawner == "" {
return errors.New("--waits-for-gate given without --waits-for")
} Prevention
- Always pair --waits-for-gate with --waits-for in wrapper scripts
- Emit the gate flag conditionally only when the spawner value is non-empty
- Remember the gate alone never creates a waits-for relationship
When it happens
Trigger: `bd create "Task" --waits-for-gate any-children` without `--waits-for <spawner>`; the gateExplicit path in buildWaitsFor (called from runCreateProxiedSingle) sees an empty trimmed spawnerID and returns this error.
Common situations: Users copying the --waits-for-gate flag from an example but omitting the required --waits-for; wrappers that pass through an empty spawner variable while always appending the gate flag.
Related errors
- invalid --waits-for-gate value %q (valid: all-children, any-
- no %s provided (%s)
- --source-db and --output are required
- ExternalDoltConfig: Port requires Host
- ExternalDoltConfig: TLSCert set without TLSKey
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/0b707de46c2f5a21.
Report an issue: GitHub.