Support Anthropic conversation logging and retries
Tests / Test apps.device-host-agent.tests.test_mcp_token.test_load_or_create_concurrent_calls_do_not_corrupt failed

This commit is contained in:
showtan001
2026-08-30 22:29:19 +08:00
parent 44e1a6651a
commit 5458f3b8a4
4 changed files with 113 additions and 14 deletions
+12 -7
View File
@@ -187,13 +187,18 @@ class TaskRunner:
"failed",
result.error or "step failed",
)
self._update_task(
task,
status="failed",
completed=True,
failure_reason=result.error or "step failed",
)
return task
# AI planners can use the structured failure feedback to
# correct malformed arguments or choose another action.
# Deterministic planners retain their fail-fast behavior.
if self.planner.__class__.__name__ != "AIPlanner":
self._update_task(
task,
status="failed",
completed=True,
failure_reason=result.error or "step failed",
)
return task
break
self._emit_step_progress(
len(context.step_results),