wavetermdev/waveterm · error

setting config: %w

Error message

setting config: %w

What it means

`wsh setconfig` validates its key=value arguments locally, then sends the parsed metadata map to the running Wave Terminal via SetConfigCommand with a 2-second timeout. Any RPC failure (no connection, timeout, or server-side rejection of the config change) is wrapped with "setting config". The local parsing succeeded but the configuration was not applied.

Source

Thrown at cmd/wsh/cmd/wshcmd-setconfig.go:39

func init() {
	rootCmd.AddCommand(setConfigCmd)
}

func setConfigRun(cmd *cobra.Command, args []string) (rtnErr error) {
	defer func() {
		sendActivity("setconfig", rtnErr == nil)
	}()

	metaSetsStrs := args[:]
	meta, err := parseMetaSets(metaSetsStrs)
	if err != nil {
		return err
	}
	commandData := wshrpc.MetaSettingsType{MetaMapType: meta}
	err = wshclient.SetConfigCommand(RpcClient, commandData, &wshrpc.RpcOpts{Timeout: 2000})
	if err != nil {
		return fmt.Errorf("setting config: %w", err)
	}
	WriteStdout("config set\n")
	return nil
}

View on GitHub (pinned to a4447c1563)

Solutions

  1. Run the command from within a Wave Terminal block so an RPC client is available
  2. Retry the command after confirming the terminal is responsive (e.g. `wsh ls`)
  3. Check the Wave Terminal connection; restart the terminal connection if it is hung
  4. Inspect the wrapped error after the colon for the server-side cause
Defensive patterns

Strategy: retry

Validate before calling

# confirm connectivity before applying config
wsh ls / >/dev/null 2>&1 || { echo "no wsh connection" >&2; exit 1; }

Try / catch

const { execSync } = require("child_process");
try {
  execSync(`wsh setconfig ${args}`);
} catch (e) {
  if (String(e.stderr).includes("setting config")) {
    console.error("RPC failed; check terminal connection and retry");
  } else throw e;
}

Prevention

When it happens

Trigger: Running `wsh setconfig` outside a Wave Terminal context; the terminal connection dropped; the RPC exceeded the 2000ms timeout on slow/SSH remotes; or the server rejected the settings payload.

Common situations: Running wsh from a plain shell not attached to Wave; transient network issues on remote connections; hung terminal causing the 2s timeout to fire.

Related errors


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