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
{{ message }}
Repository navigation
prompt-hook runs on Claude Code <agent-message> subagent hand-backs and hits the 30s hook timeout #2184
v1.6.1 skips prompts that are a single <task-notification>...</task-notification> envelope (isTaskNotification, #1884). Claude Code also delivers subagent results to the parent session as UserPromptSubmit prompts in a different envelope:
These prompts are not user input. They are also usually long, because they carry a subagent's full report. prompt-hook runs a full explore on them. In one session, two hand-backs of about 5-8 KB each made the hook go past Claude Code's default 30 s hook timeout:
UserPromptSubmit hook [codegraph.cmd prompt-hook] timed out after 30s -- output discarded.
When the hook finishes in time, the injected context is unrelated to the prompt (symbols matched from words in the prose report).
Expected:prompt-hook exits immediately on <agent-message ...>...</agent-message> prompts, the same way it does for <task-notification>.
Suggested fix: extend isTaskNotification (or add isAgentMessage) to match ^\s*<agent-message\b[^>]*>[\s\S]*<\/agent-message>\s*$.
Environment: Windows 11, Claude Code CLI, CodeGraph v1.6.0 (the #1884 fix in v1.6.1 does not match this envelope; checked against the PR diff).
Activity
fix(prompt-hook): skip Claude Code <agent-message> subagent hand-backs (
perf(context): stop redoing per-query work per candidate on long prompts
perf(context): stop redoing per-query work per candidate on long prompts
perf(context): stop redoing per-query work per candidate on long prompts
perf(context): stop redoing per-query work per candidate on long prompts
perf(context): stop redoing per-query work per candidate on long prompts