wavetermdev/waveterm · error
no workspaces found
Error message
no workspaces found
What it means
Error from `wsh blocks list` when the WorkspaceList RPC succeeded but returned an empty list. Wave normally always has at least one workspace, so this signals a degenerate or broken server state. It is a guarded empty-result condition, not a transport failure.
Source
Thrown at cmd/wsh/cmd/wshcmd-blocks.go:115
// blocksListRun implements the 'blocks list' command
// It retrieves and displays blocks with optional filtering by workspace, window, tab, or view type
func blocksListRun(cmd *cobra.Command, args []string) error {
if v := strings.TrimSpace(blocksView); v != "" {
if !isKnownViewFilter(v) {
return fmt.Errorf("unknown --view %q; try one of: term, web, preview, edit, sysinfo, waveai", v)
}
}
var allBlocks []BlockDetails
workspaces, err := wshclient.WorkspaceListCommand(RpcClient, &wshrpc.RpcOpts{Timeout: int64(blocksTimeout)})
if err != nil {
return fmt.Errorf("failed to list workspaces: %v", err)
}
if len(workspaces) == 0 {
return fmt.Errorf("no workspaces found")
}
var workspaceIdsToQuery []string
// Determine which workspaces to query
if blocksWorkspaceId != "" && blocksWindowId != "" {
return fmt.Errorf("--workspace and --window are mutually exclusive; specify only one")
}
if blocksWorkspaceId != "" {
workspaceIdsToQuery = []string{blocksWorkspaceId}
} else if blocksWindowId != "" {
// Find workspace ID for this window
windowFound := false
for _, ws := range workspaces {
if ws.WindowId == blocksWindowId {
workspaceIdsToQuery = []string{ws.WorkspaceData.OID}
windowFound = true
breakView on GitHub (pinned to a4447c1563)
Solutions
- Restart Wave Terminal so the default workspace is recreated
- Create a workspace in the Wave UI and retry
- Inspect/reset ~/.waveterm config state if workspaces remain missing after restart
Defensive patterns
Strategy: try-catch
Validate before calling
workspaces, err := wshclient.WorkspaceListCommand(RpcClient, nil)
if err == nil && len(workspaces) == 0 {
// surface a targeted message or recreate the default workspace instead of proceeding
} Type guard
func hasWorkspaces(ws []wshrpc.WorkspaceInfo) bool { return len(ws) > 0 } Try / catch
workspaces, err := listWorkspaces()
if err != nil || len(workspaces) == 0 {
// restart Wave / recreate workspace
} Prevention
- Keep at least one workspace open in Wave
- Restart Wave after config corruption to regenerate the default workspace
- Avoid wiping ~/.waveterm state without backing up
When it happens
Trigger: WorkspaceListCommand returns a zero-length slice: no workspaces exist in the running Wave instance (e.g. fresh/corrupted state where the default workspace was not created).
Common situations: Corrupted or freshly initialized Wave config where the default workspace is missing; running against a stubbed/dev server with no workspaces seeded.
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
Related errors
- source cannot be blank
- nil wshrpc passed to wshclient
- no files or message provided
- too many files (maximum %d files allowed)
- stdin (-) can only be used once
AI-assisted analysis of wavetermdev/waveterm@a4447c1563 (2026-09-01).
Data as JSON: /api/errors/5de3309538560020.
Report an issue: GitHub.