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
- Run the command from within a Wave Terminal block so an RPC client is available
- Retry the command after confirming the terminal is responsive (e.g. `wsh ls`)
- Check the Wave Terminal connection; restart the terminal connection if it is hung
- 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
- Run wsh setconfig from inside a Wave Terminal block
- Confirm the terminal responds (wsh ls) before config changes
- Retry transient timeout failures; avoid running during connection churn
- Keep wsh and waveterm versions in sync
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
- setting background: %v
- running view command: %w
- playing system bell: %v
- watching pid: %v
- failed to list workspaces: %v
AI-assisted analysis of wavetermdev/waveterm@a4447c1563 (2026-09-01).
Data as JSON: /api/errors/c0a3124f6879fdfc.
Report an issue: GitHub.