TDTech Digest

062. 모드 문제 해결 (Troubleshoot a mod)

  • 원문: English
  • 위치: Plugins › Mods › Test and troubleshoot › Troubleshoot a mod

한 줄 요약

모드나 훅이 실패하면 Claude Code는 조용히 건너뛰고 세션을 계속하므로, claude plugin validate, 트랜스크립트/디버그 로그/stderr의 한 줄 메시지, claude plugin test 로 원인을 찾습니다.

쉽게 말하면

“모드가 아무것도 안 한다” = 대부분 로드 거부, 훅 건너뜀, 트리 검증 실패 중 하나입니다. 증상이나 메시지 문구로 아래 표를 찾아보세요.

핵심 내용

1단계: 어디서 메시지를 보나

세션 종류메시지 위치
--plugin-dir 또는 핫 리로드가 켜진 세션트랜스크립트의 흐린 줄
그 외 대화형 세션(마켓플레이스 설치 모드 등)디버그 로그 (claude --debug)
claude -p + --plugin-dirstderr (다른 모드의 거부는 디버그 로그)
  • 먼저 claude plugin validate ./first-mod 로 매니페스트·모듈 읽기 오류를 확인합니다.

모드 로드 가능 여부 확인

모드가 없는 디렉터리에서 claude plugin test 실행:

메시지의미
no hooks module to load로드 가능 (테스트할 모드 없음)
hooks modules are turned off heredisableAllHooks 또는 조직 정책이 차단
... the rollout switch served offAnthropic이 원격으로 설치 모드를 끔
... saved off by an earlier session이전 저장값. claude 를 한 번 실행해 갱신
  • 📝 allowManagedModsOnly(조직 모드만 허용)는 이 명령에 표시되지 않습니다.

모드가 로드되지 않음

  • /plugin 의 mods active 줄에 모드가 없으면, 디버그 로그에서 hooks module <이름> not loaded: 뒤 문구를 찾습니다.
not loaded: 뒤 메시지의미
... rollout switch served off / saved off ...원격 차단 / 재시작으로 갱신
hooks modules a person installed wait for the rollout switch클라우드 세션에서 대기 중 → 메시지를 하나 더 보내기
disableAllHooks in managed settings조직이 설치 플러그인 훅을 끔
only managed plugins and built-in plugins runallowManagedHooksOnly 또는 비관리 설정의 disableAllHooks
... (--bare)--bare 로 시작함
another plugin of that name loads first같은 이름의 플러그인이 먼저 로드

기본 가드(built-in guard) 메시지:

메시지 포함의미
(allowManagedModsOnly)조직 모드만 허용되어 거부
(allowModsToOverrideDenyRules)tool.check 등이 결정을 완화하려 함 → next(e) 결과나 더 엄격한 결정 반환
the rules and hooks in your settings could not be checked ...가드 검사 실패로 호출 거부
is not for plugins outside policy to change허용 안 된 $.env.set
would be named as a tool of one of the organization's servers플러그인 이름이 조직 MCP 서버/플러그인 이름과 충돌 → 이름 변경

기타 로드 실패:

증상/메시지조치
validate는 통과, hooks 줄 없음hooks/hooks.json 에 "modules": ["./register.js"] 추가
hooks module did not load: <reason>문법 오류 등 수정. ; the version loaded before is unloaded 면 수정 후 /reload-plugins
options do not fit plugin.json userConfigsettings.json 의 pluginConfigs 값 수정
code nested too deep to scan: more than 2000 scopes / ran out of stack ...중첩·import 체인 줄이기
처음 연 디렉터리에서 로드 안 됨claude 로 신뢰(trust) 프롬프트 수락
설치 플러그인이 전부 안 됨--safe-mode 없이 시작
핫 리로드 질문이 더 안 뜸답 없이 3번 끝나면 꺼짐(askUserQuestionTimeout 영향). 모드 폴더를 복사해 claude --plugin-dir ~/mods/<이름>

훅 건너뜀 / 모드 언로드

메시지의미 / 조치
<mod>: <event> hook skipped: <reason>throw, 시간 초과, 잘못된 결과 형태. 리로드 전까지 이벤트·실패 종류별 1회 표시(디버그 로그엔 매번)
call refused / result withheld훅과 값 복사 실패. refused = 동작 거부, withheld = 동작은 실행됨
registered /tally but no command.run hook answered itcommand.run 훅 없음/필터 불일치/next(e) 반환/훅 skip(focus: false 전달 등)
was unloaded: it crashed the hooks worker설치 모드는 워커 스레드 하나를 공유. await 없는 무한 루프 등 수정
its session.start ran again in a fresh copy정상. 이미 한 $.prompt.submit 등은 재실행 안 됨 (v2.1.292+)
This mod's change didn't load ...Claude가 이 줄을 못 보므로 다음 메시지에 붙여 넣기
reload failed, the previous version stays loaded / reload failed이전 버전 유지 여부 확인 후 수정. 성공 시 reloaded
$.agent.register refused: ... no longer loaded옛 모듈 복사본에서 호출 → session.start 에서 등록
mods that run in the hooks worker are off ...: it crashed 3 times내장 외 모든 모드(조직 모드 포함) 언로드 → /reload-plugins

도구 호출 거부 / 중단 후 토스트

  • a hook changed this call's input after the model wrote it: auto 모드에서 서버 측 분류기 검토 후 훅(tool.call, turn.step, PreToolUse)이 입력을 바꿈. 계속 거부되면 모드/훅을 끄거나 auto 모드를 벗어나 직접 승인.
  • stopped · type a message to continue 토스트: 사용자가 턴을 멈춘 뒤 모드가 작업을 시작하려다 막힘. 고칠 것 없음(054).

화면이 안 보이거나 반응 없음

증상원인 / 조치
다른 모드 밴드만 보임트리 검증 실패(ui.render hook skipped, does not validate), 밴드 합계 한도 초과(past the limits of the band), 다른 모드가 가림
Pane/밴드가 비거나 기본 내용트리 검증 실패. 예: Box prop "flexDirection" must be one of row, column, ...
ui.render (<site>) refused:크기 한도 초과 → 트리 축소
needs a key / is drawn twice / key each onceInput/Select/Button 에 고유한 문자열 key
threw while drawn: ...; the engine drew its own반환 트리나 next 에 넘긴 props 값 오류
the module failed without a messageClient 코드의 throw new Error() 에 메시지 추가
$.ui.open 후 Pane 없음isPlaced: false 의 reason: unasked below(넓은 터미널/명령에서 열기), no-surface(-p 실행 → { text } 반환)
토스트 안 보임holdToasts Pane, classic 렌더러에서는 프롬프트 아래 한 줄, 새 토스트가 대체, 전체 화면은 동시 3개까지
plugin panel hidden밴드 접힘 → Ctrl+X → Ctrl+A
핫키 무반응포커스 없음(Ctrl+X → Tab), 접힌 밴드, 다른 모드와 핫키 충돌, VS Code(핫키 없음)
터미널만 되고 Desktop/VS Code 안 됨사이트·요소 미지원, VS Code 확장 2.1.299 미만, 기능 플래그 미조회 세션(Bedrock, Vertex, Foundry 등)은 2.1.304 미만
  • 오디오($.audio.play, Desktop Code 탭 클라우드 세션): 스피커 버튼 켜기, 창 포커스, 에러에 can't play the clip 이면 1 MiB 이하 PCM WAV 로 변환.

편집·값이 사라짐

증상조치
편집이 반영 안 됨설치 시 복사본이 실행됨 → 개발 중엔 claude --plugin-dir ./first-mod
리로드 시 값 초기화모듈 변수 대신 $.state/$.store
/clear·/resume·/branch 후 초기화classic.SessionStart 에서 다시 로드(051)
settings.read 로 바꾼 키가 무효권한 규칙과 env 는 적용 안 됨 → 설정 파일 또는 $.env.set. 로그에서 settings.read 검색
the answer for <key> is no value the key can hold스키마에 맞지 않는 값(내 것 또는 다른 모드)
settings.read: refused to the engine어떤 훅이 { deny } → 모드를 하나씩 끄며 --debug-file 로 확인

디버그 로그 읽기

claude --debug-file ./mod-debug.log --plugin-dir ./first-mod
tail -f ./mod-debug.log | grep first-mod
  • 로드 성공 예: hooks module first-mod@inline loaded (worker, environment 2, tier user); events: ... (--plugin-dir 모드는 @inline).
  • 내 로그를 디버그 로그로: $.ui.log('message', { to: 'debug' }).

실무 관점

  • 조직에서 disableAllHooks, allowManagedHooksOnly, allowManagedModsOnly 같은 관리 설정이 모드를 막을 수 있습니다. 사용자 문의 시 디버그 로그의 not loaded: 문구부터 받으세요(082).
  • 설치 모드들은 하나의 워커를 공유하므로, 한 모드의 블로킹 코드가 전체 모드를 언로드시킬 수 있습니다. 배포 전 claude plugin test 와 코드 리뷰를 권장합니다.
  • Bedrock 등 기능 플래그를 조회하지 않는 환경에서 VS Code를 쓴다면 확장 버전을 2.1.304 이상으로 맞추세요.