Skip to content

Commit 1d719d1

Browse files
committed
Tweak
1 parent a5178b4 commit 1d719d1

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

backend/src/tools/handlers/tool/spawn-agents.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,20 +156,25 @@ export const handleSpawnAgents = ((params: {
156156
subAgentMessages.push(conversationHistoryMessage)
157157
}
158158

159-
const subAgentState = {
159+
const subAgentState: AgentState = {
160160
agentId,
161161
agentType,
162162
agentContext: {},
163163
subagents: [],
164164
messageHistory: subAgentMessages,
165165
stepsRemaining: 20, // MAX_AGENT_STEPS
166166
output: undefined,
167-
// Add parent ID to agent state for communication
168167
parentId: agentState!.agentId,
169168
}
170169

171170
logger.debug(
172-
{ agentTemplate, prompt, params, agentId, parentId: agentState.parentId },
171+
{
172+
agentTemplate,
173+
prompt,
174+
params,
175+
agentId,
176+
parentId: subAgentState.parentId,
177+
},
173178
`Spawning agent — ${agentType} (${agentId})`
174179
)
175180

0 commit comments

Comments
 (0)