Description
rtk hook claude accepts --ultra-compact and --skip-env (they're documented in rtk hook --help), but neither flag has any effect: the rewritten command emitted to Claude Code is byte-identical with and without them. The flags are silently dropped.
This matters because the hook is the only path most Claude Code users ever exercise — commands are rewritten transparently, so a user never types rtk by hand. Configuring "command": "rtk hook claude --ultra-compact" in ~/.claude/settings.json looks like it enables Level 2 savings, but it is a no-op. There is no error and no warning, so the setting appears to work.
Repro steps
for f in "" "--ultra-compact" "--skip-env"; do
echo '{"tool_name":"Bash","tool_input":{"command":"next build"}}' \
| rtk hook claude $f \
| python3 -c 'import sys,json;print(json.load(sys.stdin)["hookSpecificOutput"]["updatedInput"]["command"])'
done
Output:
rtk next # no flag
rtk next # --ultra-compact
rtk next # --skip-env
Same result for every command type I tried (git status, jest, tsc --noEmit, eslint src, grep -rn foo src, npm run build).
Expected
The hook should propagate its flags into the rewritten command, e.g.
rtk hook claude --ultra-compact -> rtk next --ultra-compact
rtk hook claude --skip-env -> rtk next --skip-env
rtk next (and the other subcommands) already accept both flags — rtk next --help lists them — so the target side is in place; only the hook's rewrite is missing them.
If the flags are intentionally unsupported on the hook path, they should be rejected at parse time or removed from rtk hook --help rather than accepted and ignored.
Actual
Flags are accepted, produce no change, and emit no warning.
Version / environment
- rtk 0.43.0, macOS arm64 (Darwin 24.6.0)
- Hook configured as a
PreToolUse / Bash matcher in ~/.claude/settings.json
Note
Distinct from #2369, which is about the top-level -u shorthand not being implemented on the main CLI. This report is about the long flags being accepted by rtk hook claude and then not reaching the rewritten command.
Description
rtk hook claudeaccepts--ultra-compactand--skip-env(they're documented inrtk hook --help), but neither flag has any effect: the rewritten command emitted to Claude Code is byte-identical with and without them. The flags are silently dropped.This matters because the hook is the only path most Claude Code users ever exercise — commands are rewritten transparently, so a user never types
rtkby hand. Configuring"command": "rtk hook claude --ultra-compact"in~/.claude/settings.jsonlooks like it enables Level 2 savings, but it is a no-op. There is no error and no warning, so the setting appears to work.Repro steps
Output:
Same result for every command type I tried (
git status,jest,tsc --noEmit,eslint src,grep -rn foo src,npm run build).Expected
The hook should propagate its flags into the rewritten command, e.g.
rtk next(and the other subcommands) already accept both flags —rtk next --helplists them — so the target side is in place; only the hook's rewrite is missing them.If the flags are intentionally unsupported on the hook path, they should be rejected at parse time or removed from
rtk hook --helprather than accepted and ignored.Actual
Flags are accepted, produce no change, and emit no warning.
Version / environment
PreToolUse/Bashmatcher in~/.claude/settings.jsonNote
Distinct from #2369, which is about the top-level
-ushorthand not being implemented on the main CLI. This report is about the long flags being accepted byrtk hook claudeand then not reaching the rewritten command.