From 73d577e3c339ff83c84e34e4e29589de75fa8511 Mon Sep 17 00:00:00 2001 From: furiosa Date: Thu, 22 Jan 2026 21:38:41 -0800 Subject: [PATCH] fix(convoy): ensure custom types registered before creating convoy Call beads.EnsureCustomTypes before attempting to create a convoy. This fixes invalid issue type: convoy errors that occur when town beads do not have custom types configured (e.g., incomplete install or manually initialized beads). The EnsureCustomTypes function uses caching (in-memory + sentinel file) so this adds negligible overhead to convoy create. Fixes: gt-1b8eg9 Co-Authored-By: Claude Opus 4.5 --- internal/cmd/convoy.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/cmd/convoy.go b/internal/cmd/convoy.go index d2aa4a57..231aa8da 100644 --- a/internal/cmd/convoy.go +++ b/internal/cmd/convoy.go @@ -309,6 +309,12 @@ func runConvoyCreate(cmd *cobra.Command, args []string) error { return err } + // Ensure custom types (including 'convoy') are registered in town beads. + // This handles cases where install didn't complete or beads was initialized manually. + if err := beads.EnsureCustomTypes(townBeads); err != nil { + return fmt.Errorf("ensuring custom types: %w", err) + } + // Create convoy issue in town beads description := fmt.Sprintf("Convoy tracking %d issues", len(trackedIssues))