fix(graph): retire the teammate identity before structured extraction
PR #24 follow-up 10. The identity was only retired by the frontier and chain-exit safety nets, so a peer stayed messageable during structured::extract after its agent had already stopped. Mark it finished the moment the agent future resolves, on success and on both error paths.
This commit is contained in:
2 files changed
+74
-11
No files matched your search
@@ -465,7 +465,7 @@ pub(super) async fn step(
|
||||
) -> Result<StepResult> {
|
||||
match &node.node_type {
|
||||
NodeType::Agent(agent_node) => {
|
||||
AgentNodeExecutor::execute(agent_node, state, ctx).await?;
|
||||
AgentNodeExecutor::execute(agent_node, state, ctx, !step_ctx.branch_mode).await?;
|
||||
let targets = static_next_targets(node, current, "agent", step_ctx.branch_mode)?;
|
||||
Ok(StepResult::Continue(targets))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user