Outer retry in ToolUsage cannot tell "not executed" from "unknown": one timeout can still write twice after #9345

Đang mở
#9,799 8 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@jaisogani-ai đang làm issue này rồi.

Từ ngày 25/11/2026.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
ai-infra-agents, backend

Hướng nghiên cứu

Start by reading tool_usage.py from the referenced #9345 change and trace the local-tool path through the outer retry. Reproduce the four listed cases with a deterministic pytest fixture, recording writes and caller results. The issue asks how retries should handle unknown outcomes; done requires a decided behavior that preserves recovery without duplicate writes, with tests covering both outcomes.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Thank you to everyone working on #9341 and #9345. This is a follow-up question, kept separate so that #9345 stays focused.

Check: base 89a63c5 with tool_usage.py taken from #9345's head. Sync local-tool path (not the MCP path). The test tool raises the same TimeoutError on its first invocation; if invoked again it writes once and returns "ok". "Writes" are entries in an in-memory list of the test tool, not database rows.

First invocation Max parsing attempts Recorded writes What the caller sees
raises before writing 3 1 "ok"
raises before writing 1 0 generic tool error
writes, then raises 3 2 "ok"
writes, then raises 1 1 generic tool error

So #9345 removes the replay inside one attempt, but one timeout can still lead to two writes through the outer retry, and the caller sees "ok" for both. Turning the outer retry off avoids the duplicate in the third row but gives up recovery in the first. The exception alone does not tell ToolUsage which row it is in.

Question: how should the outer retry behave when the outcome of a tool call is unknown? I can turn the four rows into a deterministic pytest fixture if that is useful.

Limits: toy tool, local path only, one deterministic run per row.

Found with ATLAS, an AI finder and checker. Thanks again for the work on this

Ngôn ngữ chính
Python
Star
61.2k
Fork
9.2k
Merge trung bình
1 ngày 14 giờ
Pull request đã merge (30 ngày)
180

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của crewAIInc/crewAI

Tất cả issue của crewAIInc/crewAI

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.