agentscope-ai / agentscope-ai/QwenPaw

[Feature]: Auto-Dream: single unit integration failure (LLM returned empty schema) marks the whole task as error — suggest retry + tolerance

未关闭
#6,841 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
enhancement
主要语言
Python
星标
34.9k
派生
3.1k
平均合并
1 天 15 小时
30 天内合并 PR
225

描述

Description:

One of my agents hit a nightly Auto-Dream failure. The task summary said status=error, but looking at the logs, the actual outcome was mostly successful — one integration unit failed on schema validation after its file had already been written to disk.

Steps to reproduce (observed, nightly run):

Auto-Dream runs nightly, scans 2 days of daily notes, extracts 5 units.
Unit 2/5 (bucket=wiki, paths=2) — topic content is domain-specific and irrelevant here:
[WriteStep] wrote path=digest/wiki/.md bytes=2613 — file written successfully
[DreamIntegrateStep] unit 2/5 failed: ValidationError: 2 validation errors for IntegrateOutcome — action and target_path missing, input_value={} (empty dict)
Other units (3/5, 4/5, 5/5) all succeeded.
Result: integrate success=False integrated=4 failed=1 → finish success=False failed_units=1 → the whole dream task pushed to inbox as status=error, and cron logged ERROR Failed to execute dream task.
Root cause: The integrate step asks the LLM to return a structured IntegrateOutcome (action, target_path, ...) validated via Pydantic. In this run the LLM returned an empty object {} (likely output truncation or schema drift), which fails validation — even though the content itself had already been written to disk. One failed unit flips the entire nightly task to error.

Suggestions:

Retry on schema validation failure — one automatic retry with the previous LLM response as context would likely fix most transient empty/truncated outputs.
Don't fail the whole task for one unit — a unit whose file was already written could be recovered from the on-disk content (parse/regenerate the metadata), or at least be reported as partial instead of error. failed_units is already tracked; surfacing it as a warning (not error) would reduce noise.
Validate before write — ask the LLM to return the metadata first, or include a fallback that derives action/target_path from the written file when the structured response is empty.
Impact: Cosmetic-ish (files are fine, next run re-digests), but status=error on every ~1-in-N nights is misleading and hides real failures.

Image

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。