Skip to content

Use LLM finish reason as the termination reason#56

Merged
mayinghan merged 7 commits intomainfrom
agent-loop-stop-by-policy
Aug 12, 2025
Merged

Use LLM finish reason as the termination reason#56
mayinghan merged 7 commits intomainfrom
agent-loop-stop-by-policy

Conversation

@mayinghan
Copy link
Copy Markdown
Collaborator

@mayinghan mayinghan commented Aug 11, 2025

Use LLM finish reason as the termination reason

@mayinghan mayinghan changed the title wip: let policy decide end of loop Let policy determine when to stop Aug 11, 2025
if recording_mode:
policy.log_conversation_state_for_playback(rollout_idx, step - 1, conversation_history)

if rollout_end:
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @xzrderek so basically the change is remove this if branch

trajectory.usage["total_tokens"] += usage_stats.total_tokens

# update control plane summary if the env marks end
if env_end:
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xzrderek but we still save the information in the control plane summary

@mayinghan mayinghan changed the title Let policy determine when to stop Use LLM finish reason as the termination reason Aug 12, 2025
@mayinghan mayinghan force-pushed the agent-loop-stop-by-policy branch from 8c2a7f7 to 70dd006 Compare August 12, 2025 07:15
@mayinghan mayinghan merged commit 6045ee9 into main Aug 12, 2025
12 of 13 checks passed
@mayinghan mayinghan deleted the agent-loop-stop-by-policy branch August 12, 2025 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant