can1357/oh-my-pi · error · ToolError
Unsupported launch key ${rawKey}
Error message
Unsupported launch key ${rawKey} What it means
The send operation lets you inject key presses via `params.keys`; each key is uppercased and looked up in the KEY_INPUT table. If a key name is not in that table, sendData() throws ToolError 'Unsupported launch key <key>', listing the offending key verbatim.
Source
Thrown at packages/coding-agent/src/tools/hub/launch.ts:218
log: ready.log,
port: ready.port,
host: ready.host,
timeoutMs: timeoutMs(ready.timeout, 30),
}
: undefined,
restart: params.restart ?? "no",
persist: (params.persist ?? false) || detached,
detached,
};
}
function sendData(params: LaunchParams): string | undefined {
let data = params.text ?? "";
if (params.text && (params.enter ?? true)) data += KEY_INPUT.ENTER;
for (const rawKey of params.keys ?? []) {
const key = rawKey.trim().toUpperCase();
const input = KEY_INPUT[key];
if (input === undefined) throw new ToolError(`Unsupported launch key ${rawKey}`);
data += input;
}
return data || undefined;
}
function operationFor(params: LaunchParams, session: ToolSession): DaemonOperation {
switch (params.op) {
case "start":
return { op: "start", spec: commandSpec(params, session), owner: session.getSessionId?.() ?? undefined };
case "list":
return { op: "list" };
case "logs":
return {
op: "logs",
name: requiredName(params),
lines: Math.min(1_000, Math.floor(params.lines ?? 100)),
head: params.head ?? false,
grep: params.grep,View on GitHub (pinned to 9690622007)
Solutions
- Use canonical key names supported by the launch tool's KEY_INPUT table (e.g. "ENTER", "ESCAPE", "TAB", "UP", "C-c"-style ctrl combos as documented).
- Check the tool's parameter schema/description for the exact accepted key list.
- Send the text directly via `text` for printable input and reserve `keys` for control keys.
Example fix
// before
launch({ op: "send", name: "cli", keys: ["RETURN"] })
// throws: Unsupported launch key RETURN
// after
launch({ op: "send", name: "cli", keys: ["ENTER"] }) Defensive patterns
Strategy: validation
Validate before calling
const SUPPORTED_KEYS = new Set(["ENTER", "TAB", "ESCAPE", "UP", "DOWN", "LEFT", "RIGHT" /* per KEY_INPUT table */]);
for (const k of params.keys ?? []) {
if (!SUPPORTED_KEYS.has(k.trim().toUpperCase())) throw new Error(`Unsupported launch key ${k}`);
} Try / catch
try {
await launchTool.run({ op: "send", name, keys });
} catch (err) {
if (err instanceof ToolError && err.message.startsWith("Unsupported launch key")) {
// correct the key name against the supported set and retry
} else throw err;
} Prevention
- Use the exact canonical key names from the launch tool docs, not abbreviations (ESCAPE not ESC).
- Send printable characters via text instead of keys.
- Keep a whitelist of valid keys in any automation layer.
When it happens
Trigger: launch({ op: "send", name, keys: ["CTRL+SHIFT+T"] }) or keys: ["ESC"] if the table only defines "ESCAPE"; any non-canonical key name like "RETURN", "CMD", or a multi-key chord not present in KEY_INPUT.
Common situations: Guessing key names instead of using the tool's supported set (ENTER, TAB, ESCAPE, arrow keys, CTRL-letter combos as defined); lowercase/abbreviated spellings; sending chords the KEY_INPUT table does not encode.
Related errors
- ${params.op} requires name
- start requires application
- ready.port must be an integer from 1 to 65535
- ready requires log or port
- unsupported benchmark: ${benchmark}
AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31).
Data as JSON: /api/errors/2d440068803ace32.
Report an issue: GitHub.