90
let toolArguments: Record<string, unknown> | undefined;
91
if (tc.toolInput) {
93
>
const parsed = JSON.parse(tc.toolInput);
94
>
if (parsed && typeof parsed === 'object') {
95
>
toolArguments = parsed as Record<string, unknown>;
96
>
}
97
>
} catch {
98
// Non-JSON tool input: omit structured arguments (the forward
99
// mapper regenerates the invocation display from the tool name).
100
}
102
// If the tool call carries sub-agent identity, emit `subagent.started`
103
// first so a resume reconstructs the sub-agent name/description onto the