-
-
Notifications
You must be signed in to change notification settings - Fork 79.1k
[Bug] Cron task summary ignores agent self-correction - picks tool error over final assistant reply #74807
Copy link
Copy link
Open
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Problem
When a Cron
agentTurnjob runs in an isolated session, the final summary/announcement picks the last tool error message as the task result instead of the agent's final self-corrected assistant reply.Observed behaviour
editcall fails (e.g.oldTextnot found).Root cause
The summary logic appears to prefer tool results (which are system-generated) over the agent's final
assistantmessage when determining what to announce. This means any intermediate tool failure that the agent later overcomes is surfaced as the final status.Expected behaviour
The summary should prefer the last
assistantturn in the session as the authoritative outcome, not an intermediate tool error. If the agent's final message indicates success, the announcement should reflect success.Suggested fix
When walking the session transcript to build the announcement:
Environment
agentTurnin isolated sessionDiscovered during analysis of a daily-cleanup Cron job that self-corrected a file-edit error but was still reported as failed.