wavetermdev/waveterm · error

getting job debug list: %w

Error message

getting job debug list: %w

What it means

`wsh jobdebug list` first calls JobControllerListCommand with a 5s timeout; any failure is wrapped as 'getting job debug list' (cmd/wshcmd-jobdebug.go:166). This is the server-side job registry query failing, typically due to RPC transport problems to the Wave client or job control plane.

Source

Thrown at cmd/wsh/cmd/wshcmd-jobdebug.go:166

	jobDebugGetOutputCmd.Flags().StringVar(&jobIdFlag, "jobid", "", "job id to get output for (required)")
	jobDebugGetOutputCmd.MarkFlagRequired("jobid")

	jobDebugStartCmd.Flags().StringVar(&jobConnFlag, "conn", "", "connection name (required)")
	jobDebugStartCmd.MarkFlagRequired("conn")

	jobDebugAttachJobCmd.Flags().StringVar(&attachJobIdFlag, "jobid", "", "job id to attach (required)")
	jobDebugAttachJobCmd.MarkFlagRequired("jobid")
	jobDebugAttachJobCmd.Flags().StringVar(&attachBlockIdFlag, "blockid", "", "block id to attach to (required)")
	jobDebugAttachJobCmd.MarkFlagRequired("blockid")

	jobDebugDetachJobCmd.Flags().StringVar(&detachJobIdFlag, "jobid", "", "job id to detach (required)")
	jobDebugDetachJobCmd.MarkFlagRequired("jobid")
}

func jobDebugListRun(cmd *cobra.Command, args []string) error {
	rtnData, err := wshclient.JobControllerListCommand(RpcClient, &wshrpc.RpcOpts{Timeout: 5000})
	if err != nil {
		return fmt.Errorf("getting job debug list: %w", err)
	}

	connectedJobIds, err := wshclient.JobControllerConnectedJobsCommand(RpcClient, &wshrpc.RpcOpts{Timeout: 5000})
	if err != nil {
		return fmt.Errorf("getting connected job ids: %w", err)
	}

	connectedMap := make(map[string]bool)
	for _, jobId := range connectedJobIds {
		connectedMap[jobId] = true
	}

	if jobDebugJsonFlag {
		jsonData, err := json.MarshalIndent(rtnData, "", "  ")
		if err != nil {
			return fmt.Errorf("marshaling json: %w", err)
		}
		fmt.Printf("%s\n", string(jsonData))

View on GitHub (pinned to a4447c1563)

Solutions

  1. Ensure the Wave Terminal app is running and the wsh RPC client is connected, then retry
  2. Run `wsh connectionstate`/`wsh conn show` to check the underlying connection before debugging jobs
  3. Restart the wsh session or reconnect the route if the client is stale

Example fix

// before
wsh jobdebug list   # rpc timeout
// after
wsh conn show       # verify connectivity
wsh jobdebug list
Defensive patterns

Strategy: retry

Validate before calling

wsh conn show && echo ok || echo 'fix connection first'

Try / catch

for i in 1 2 3; do
  wsh jobdebug list && break
  sleep 2
 done

Prevention

When it happens

Trigger: Running `wsh jobdebug list` (or --json) when the RPC client cannot reach the job controller — Wave app not running, socket broken, or 5s timeout exceeded.

Common situations: Debugging jobs from an environment where wsh cannot connect to the app; app under heavy load causing the 5s timeout; stale wsh session after app restart.

Related errors


AI-assisted analysis of wavetermdev/waveterm@a4447c1563 (2026-09-01). Data as JSON: /api/errors/90276c76e8556520. Report an issue: GitHub.