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

Abierto
#9,799 8 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@jaisogani-ai ya está trabajando en esto.

Desde el 25/11/2026.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
Python
Estrellas
61.2k
Forks
9.2k
Merge medio
1 d 14 h
PR fusionados (30 d)
180

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de crewAIInc/crewAI

Todos los issues de crewAIInc/crewAI

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.