File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
src/magentic_ui/teams/orchestrator Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -1636,6 +1636,9 @@ async def _execute_sentinel_step(
16361636 "type" : "sentinel_error" ,
16371637 },
16381638 )
1639+ # add last message from agent to history
1640+ self ._state .message_history .append (last_agent_message )
1641+
16391642 # inform orchestrator that the step has failed
16401643 self ._state .message_history .append (
16411644 TextMessage (
@@ -1687,7 +1690,12 @@ async def _execute_sentinel_step(
16871690 log_msg ,
16881691 metadata = complete_metadata ,
16891692 )
1693+
1694+ # add last message from agent to history
1695+ self ._state .message_history .append (last_agent_message )
1696+
16901697 # inform orchestrator that the step is completed
1698+
16911699 self ._state .message_history .append (
16921700 TextMessage (
16931701 content = f"Sentinel step '{ step .title } ' completed successfully. Reason: { reason } " ,
You can’t perform that action at this time.
0 commit comments