Skip to content

Cursor 훅: 받지 못하는 subagent와 stop 항목을 걷어냅니다 - #946

Merged
yansfil merged 1 commit into
mainfrom
fix/cursor-hooks-retire-940
Oct 10, 2026
Merged

yansfil merged 1 commit into
mainfrom
fix/cursor-hooks-retire-940

Conversation

@yansfil

@yansfil yansfil commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Closes #940
Closes #932

Summary

Cursor의 CLI는 Task 서브에이전트에 subagent 훅을 실행하지 않아서(#911), Hide가 ~/.cursor/hooks.json에 쓰던 subagentStart, subagentStop, stop 항목은 이벤트마다 프로세스만 하나 더 띄웠습니다.
이제 Cursor에는 sessionStart와 preToolUse(Shell)만 설치하고, 이전에 설치한 세 키는 Hide 표식이 붙은 항목만 걷어냅니다.
표식을 hide-guidance@3으로 올려서 @2로 설치된 파일은 Outdated로 읽히고 다시 쓰입니다.
Grok 파일도 같은 표식을 쓰므로 @3으로 다시 쓰이지만 내용은 그대로입니다.

Review

  • 판단해 주세요: @2 설치를 사용자 확인 없이 Outdated로 읽어 다시 쓰는 것이 맞는지(기존 버전 올림과 같은 경로입니다).
  • 조심해서 볼 파일: hide-agent-hooks/src/guidance.rs - 사용자와 다른 도구가 stop 등에 둔 항목을 건드리지 않아야 해서 retired_keys가 표식 있는 항목만 지웁니다.
  • 조심해서 볼 파일: hide-agent-hooks/src/bin/hide-agent-hooks.rs - 일부러 바꾸지 않았습니다. 남아 있는 @2 항목이 전환 기간에 계속 allow를 답해야 하기 때문입니다.

Evidence

  • 확인한 것: @2 Cursor 파일(Hide 항목 5개, Orca의 stop 포함)에 설치하면 [sessionStart, preToolUse, stop]만 남고 Orca의 stop은 그대로이며 상태가 Installed(@3)입니다. 제거는 Hide 항목 5개만 걷어냅니다.
  • 확인한 것: verify-cargo.sh lint, verify-cargo.sh test 전체, verify-web.sh 통과. Grok/Cursor e2e 5개(고정한 Herdr)를 새 파일 모양에 맞춰 고쳐 통과했습니다.
  • Flaky test: hide-agent-hooks::it grok_cursor_hooks::cursor_answers_allow_to_each_subagent_start_and_tells_herdr_no_count #932 원인과 수정: grok_cursor_hooks.rs의 Herdr stand-in이 pid+시계로 폴더 이름을 만들어 병렬 실행에서 이름이 충돌했습니다. docs/TESTING.md Rust 규칙 7대로 tempfile 비공개 폴더(/tmp, 접두사 hah-gc-)를 씁니다.
  • 확인하지 못한 것: 운영자 앱의 실제 ~/.cursor/hooks.json 전환은 보지 않았습니다(운영자 앱은 건드리지 않습니다).

Breaking change

설치된 Cursor 훅 파일이 @3으로 다시 쓰이고 Hide의 subagentStart/subagentStop/stop 항목이 사라집니다. 운영자가 할 일은 없습니다.

Cursor's CLI runs no subagent hook for a Task subagent, so Hide's
subagentStart, subagentStop and stop entries only cost a process per
event. The guidance marker moves to @3, which reads an @2 install as
outdated and rewrites it; the retired keys are stripped by marker and an
operator's or another tool's entry under them is kept. The Grok and
Cursor e2e spec follows the new file shape, and the pinned-Herdr stand-in
in the hook integration test takes a private folder instead of a
pid-named one.
@yansfil
yansfil merged commit 493bc6e into main Oct 10, 2026
22 checks passed
@yansfil
yansfil deleted the fix/cursor-hooks-retire-940 branch October 10, 2026 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant