MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / executeSubagentStartHooks

Function executeSubagentStartHooks

source code/utils/hooks.ts:3934–3954  ·  view source on GitHub ↗
(
  agentId: string,
  agentType: string,
  signal?: AbortSignal,
  timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS,
)

Source from the content-addressed store, hash-verified

3932 * @returns Async generator that yields progress messages and hook results
3933 */
3934export async function* executeSubagentStartHooks(
3935 agentId: string,
3936 agentType: string,
3937 signal?: AbortSignal,
3938 timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS,
3939): AsyncGenerator<AggregatedHookResult> {
3940 const hookInput: SubagentStartHookInput = {
3941 ...createBaseHookInput(undefined),
3942 hook_event_name: 'SubagentStart',
3943 agent_id: agentId,
3944 agent_type: agentType,
3945 }
3946
3947 yield* executeHooks({
3948 hookInput,
3949 toolUseID: randomUUID(),
3950 matchQuery: agentType,
3951 signal,
3952 timeoutMs,
3953 })
3954}
3955
3956/**
3957 * Execute pre-compact hooks if configured

Callers 1

runAgentFunction · 0.85

Calls 2

createBaseHookInputFunction · 0.85
executeHooksFunction · 0.85

Tested by

no test coverage detected