Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
fix(daemon): sync workspaces from API before failing on empty runtime list (#1001)
Bohan Jiang6538496ee4b2
diff --git a/server/internal/daemon/daemon.go b/server/internal/daemon/daemon.goindex be9a592092..acccc327a7 100644--- a/server/internal/daemon/daemon.go+++ b/server/internal/daemon/daemon.go@@ -86,6 +86,17 @@ func (d *Daemon) Run(ctx context.Context) error {return err}+ // If no runtimes yet (empty watched list), run one sync cycle to discover+ // workspaces from the API before giving up. workspaceSyncLoop normally+ // handles this, but the runtime check below would fail before it runs.+ if len(d.allRuntimeIDs()) == 0 {+ d.syncWorkspacesFromAPI(ctx)+ // syncWorkspacesFromAPI writes to config; reload and register.+ if err := d.loadWatchedWorkspaces(ctx); err != nil {+ return err+ }+ }+runtimeIDs := d.allRuntimeIDs()if len(runtimeIDs) == 0 {return fmt.Errorf("no runtimes registered")