Yeachan-Heo/oh-my-codex · error · Error
Unknown tmux-hook subcommand: ${subcommand}
Error message
Unknown tmux-hook subcommand: ${subcommand} What it means
The tmux-hook CLI dispatcher received a first argument that does not match any known subcommand (install, uninstall, help/--help/-h, etc.). It is a strict subcommand whitelist; any other token falls through to this throw.
Source
Thrown at src/cli/tmux-hook.ts:89
case 'init':
await initTmuxHookConfig();
return;
case 'status':
await showTmuxHookStatus();
return;
case 'validate':
await validateTmuxHookConfig();
return;
case 'test':
await testTmuxHook(args.slice(1));
return;
case 'help':
case '--help':
case '-h':
console.log(HELP);
return;
default:
throw new Error(`Unknown tmux-hook subcommand: ${subcommand}`);
}
}
function omxDir(cwd = process.cwd()): string {
return omxRoot(cwd);
}
function tmuxHookConfigPath(cwd = process.cwd()): string {
return join(omxDir(cwd), 'tmux-hook.json');
}
function tmuxHookStatePath(cwd = process.cwd()): string {
return join(omxDir(cwd), 'state', 'tmux-hook-state.json');
}
function tmuxHookLogPath(cwd = process.cwd()): string {
return join(omxDir(cwd), 'logs', `tmux-hook-${new Date().toISOString().split('T')[0]}.jsonl`);
}View on GitHub (pinned to 3ad79a8a6f)
Solutions
- Run omx tmux-hook help to list valid subcommands
- Correct the typo (e.g. install, uninstall)
- Check the README/changelog for renamed subcommands after upgrading
Example fix
# before omx tmux-hook instal # after omx tmux-hook install
Defensive patterns
Strategy: validation
Validate before calling
const valid = new Set(['install','uninstall','help','--help','-h']);
if (!valid.has(sub)) { console.error('unknown tmux-hook subcommand'); process.exit(1); } Prevention
- Run omx tmux-hook help to enumerate subcommands
- Pin the omx version in scripts so subcommand sets don't drift
When it happens
Trigger: Running `omx tmux-hook <anything>` where the token is not one of the recognized subcommands, e.g. a typo like `omx tmux-hook instal` or an obsolete subcommand removed in a newer version.
Common situations: Typos, outdated docs or muscle memory from an older version whose subcommand set differed, or scripts written against a different CLI.
Related errors
- Unknown adapt argument: ${arg}
- Unknown adapt target: ${target}. Supported targets: ${suppor
- Unknown adapt subcommand: ${subcommand}. Supported subcomman
- --write is only supported with omx adapt <target> init
- Unknown agents-init option: ${arg}\n${AGENTS_INIT_USAGE}
AI-assisted analysis of Yeachan-Heo/oh-my-codex@3ad79a8a6f (2026-08-27).
Data as JSON: /api/errors/0467ff4dd5a25325.
Report an issue: GitHub.