Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/magentic_ui/teams/orchestrator/_orchestrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1636,6 +1636,9 @@ async def _execute_sentinel_step(
"type": "sentinel_error",
},
)
# add last message from agent to history
self._state.message_history.append(last_agent_message)

# inform orchestrator that the step has failed
self._state.message_history.append(
TextMessage(
Expand Down Expand Up @@ -1687,7 +1690,12 @@ async def _execute_sentinel_step(
log_msg,
metadata=complete_metadata,
)

# add last message from agent to history
self._state.message_history.append(last_agent_message)

# inform orchestrator that the step is completed

self._state.message_history.append(
TextMessage(
content=f"Sentinel step '{step.title}' completed successfully. Reason: {reason}",
Expand Down
Loading