663
}
664
if (params.item.type === 'collabAgentToolCall') {
666
>
const labels = collabAgentToolLabels(params.item.tool);
667
>
const toolName = `codex.${params.item.tool}`;
668
>
state.itemToToolCall.set(params.item.id, {
669
>
toolCallId,
670
>
turnId: params.turnId,
671
>
toolName,
672
>
output: '',
673
>
});
674
>
// `spawnAgent` opens a read-only peer chat for the child thread (the
675
>
// host attaches the subagent-discovery block to THIS tool call on
676
>
// `subagent_started`), so we deliberately do NOT dump the raw prompt
677
>
// into the tool box — it would duplicate the child chat's first user
678
>
// message and blow out the tool-call width. The other collab tools
679
>
// (`sendInput`, `wait`, `closeAgent`, …) are lifecycle ops with no peer
680
>
// chat, so they keep a compact prompt/model summary.
681
>
if (params.item.tool === 'spawnAgent') {
682
return [
683
{