You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following issues describe the same problem and are now tracked here: #236
Shared root cause: The hook input/output contract is too narrow: PreToolUse can only observe, append context and allow/deny — it cannot rewrite the tool input about to be executed (which blocks command proxies like rtk) — and hook stdin carries no parent_session_id, so child sessions can't be attributed to their parent.
Distinct reporters: 2
Updates will only be posted on this issue; the merged ones are closed and labelled duplicate. If you think one of them is actually a different problem, reply there and we'll split it back out.
✅ Rewriting tool input — already supported (since v3.0). A PreToolUse hook can return hookSpecificOutput.updatedInput on stdout to replace the input before the tool runs, e.g. turning git status into rtk git status:
Activity
github-actions commentedon Jun 24, 2026
👋 感谢你的反馈,我们已经收到。
status: 待评估,你可以随时补充信息。needs: 更多信息标签并 @ 你。👋 Thanks — we've received your issue.
status: 待评估(Triage); feel free to add context.needs: 更多信息and ping you.panda920 commentedon Aug 17, 2026
📌 已把重复反馈合并到这条
以下 issue 反映的是同一个问题,已合并到这里统一跟进:#236
共同根因:hook 的输入/输出契约不够用:PreToolUse 只能观察、追加上下文和放行/拦截,无法改写即将执行的工具输入(挡住了 rtk 这类命令代理);hook stdin 也没有 parent_session_id,子会话无法归属到父会话。
独立反馈人数:2
后续进展只会更新在这条 issue 下,被合并的几条已关闭并打上
duplicate。如果你认为其中某条其实是另一个问题,在那条下面回复,我们会重新拆出来。📌 Duplicate reports consolidated here
The following issues describe the same problem and are now tracked here: #236
Shared root cause: The hook input/output contract is too narrow: PreToolUse can only observe, append context and allow/deny — it cannot rewrite the tool input about to be executed (which blocks command proxies like rtk) — and hook stdin carries no parent_session_id, so child sessions can't be attributed to their parent.
Distinct reporters: 2
Updates will only be posted on this issue; the merged ones are closed and labelled
duplicate. If you think one of them is actually a different problem, reply there and we'll split it back out.panda920 commentedon Aug 18, 2026
部分已支持,说明一下现状:
✅ 改写工具输入 —— 已支持(v3.0 起就有)。PreToolUse hook 在 stdout 里返回
hookSpecificOutput.updatedInput,即可在工具真正执行前替换输入,例如把git status改写成rtk git status:{ "hookSpecificOutput": { "hookEventName": "PreToolUse", "updatedInput": { "command": "rtk git status" } } }改写后的输入会重新按工具 schema 校验,再进入权限判定与执行。
⏳ hook stdin 里的
parent_session_id(合并进来的 #236 诉求)—— 尚未支持,会继续在这里跟进。Partially supported — status update:
✅ Rewriting tool input — already supported (since v3.0). A PreToolUse hook can return
hookSpecificOutput.updatedInputon stdout to replace the input before the tool runs, e.g. turninggit statusintortk git status:{ "hookSpecificOutput": { "hookEventName": "PreToolUse", "updatedInput": { "command": "rtk git status" } } }The rewritten input is re-validated against the tool schema, then goes through the normal permission check and execution.
⏳
parent_session_idin hook stdin (the #236 request merged here) — not yet supported; we'll keep tracking it in this issue.