Function: registerSpawningToolCallResolver()
Makaio Framework / services-core / registerSpawningToolCallResolver
Function: registerSpawningToolCallResolver()
Section titled “Function: registerSpawningToolCallResolver()”registerSpawningToolCallResolver(
bus): () =>void
Defined in: ../../../packages/services/core/src/session/adapter-sessions/spawning-tool-call-resolver.ts:64
Register handler to backfill spawningToolCallId for imported subagent sessions.
When adapter.session.linked is emitted:
- Fetch children of the newly linked parent session.
- Filter to subagent children with no
spawningToolCallId. - Fetch parent session messages and scan for Agent/spawn_subagent tool_call blocks.
- Match each unmatched child to a tool_call by tool_output content reference (session ID in output string). Unmatched children are left as null.
- Update matched children via
SessionStorageSubjects.update.
Parameters
Section titled “Parameters”The bus instance to register handlers on
Returns
Section titled “Returns”Cleanup function to unsubscribe the handler
() => void
Example
Section titled “Example”import { registerSpawningToolCallResolver } from '@makaio/services-core/session';
const cleanup = registerSpawningToolCallResolver(bus);
// Later, when shutting down:cleanup();