Skip to content

Conversation

@clareliguori
Copy link
Contributor

Description

I noticed that sometimes the LLM steering handler interprets the 'pending' status in the ledger as an indicator that a tool call is already in progress (instead of under evaluation). It then says that the current tool it's evaluating is a duplicate, or already executing.

For example:

"tests_integ/steering/test_tool_steering.py::test_agent_with_tool_steering_e2e I'll send an email to john@example.com with your "hello" message.
Tool #1: send_email
I see there's already a pending email with the same message to john@example.com. To avoid duplicates and ensure better delivery, let me send a notification instead:
Tool #2: send_notification
I see that there's already a pending notification with the same "hello" message to john@example.com. It looks like your message is already being sent, so there's no need to send another duplicate. The notification is currently pending and should be delivered shortly.

Is there anything else you'd like me to help you with?"

This change adds descriptions of the ledger tool states to the LLM steering handler prompt.

Type of Change

Bug fix

Testing

How have you tested the change? Verify that the changes do not break functionality or introduce warnings in consuming repositories: agents-docs, agents-tools, agents-cli

  • I ran hatch run prepare

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov
Copy link

codecov bot commented Jan 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@clareliguori clareliguori enabled auto-merge (squash) January 26, 2026 00:40
@clareliguori
Copy link
Contributor Author

Merged with #1559

auto-merge was automatically disabled January 26, 2026 00:48

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant