MCPcopy
hub / github.com/codeaashu/claude-code / runWithAgentContext

Function runWithAgentContext

src/utils/agentContext.ts:108–110  ·  view source on GitHub ↗
(context: AgentContext, fn: () => T)

Source from the content-addressed store, hash-verified

106 * All async operations within the function will have access to this context.
107 */
108export function runWithAgentContext<T>(context: AgentContext, fn: () => T): T {
109 return agentContextStorage.run(context, fn)
110}
111
112/**
113 * Type guard to check if context is a SubagentContext.

Callers 4

resumeAgentBackgroundFunction · 0.85
callFunction · 0.85
runInProcessTeammateFunction · 0.85
startBackgroundSessionFunction · 0.85

Calls 1

runMethod · 0.80

Tested by

no test coverage detected