Skip to content

fix(background-task): return progressSummary as terminalSummary; raise progress cap to 1200 - #74103

Closed
AYH-25 wants to merge 1 commit into
openclaw:mainfrom
AYH-25:fix/74070-background-task-summary
Closed

AYH-25 wants to merge 1 commit into
openclaw:mainfrom
AYH-25:fix/74070-background-task-summary

Conversation

@AYH-25

@AYH-25 AYH-25 commented Apr 29, 2026

Copy link
Copy Markdown

Fix #74070\n\n1. resolveBackgroundTaskTerminalResult() now falls back to progressSummary as terminalSummary for non-blocked completions (was returning {})\n2. Raises ACP_BACKGROUND_TASK_PROGRESS_MAX_LENGTH from 240 to 1200 chars

…e progress cap to 1200

resolveBackgroundTaskTerminalResult() was returning {} for non-blocked
completions, making background task results appear as bare 'Background
task done' with no payload. Now falls back to cleaned progressSummary.

Also raises ACP_BACKGROUND_TASK_PROGRESS_MAX_LENGTH from 240 to 1200
chars so progress summaries don't truncate mid-sentence.

Fix openclaw#74070
@greptile-apps

greptile-apps Bot commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Fixes two related issues with background task terminal result handling: the non-blocked completion path in resolveBackgroundTaskTerminalResult now returns progressSummary as terminalSummary (previously returned {}, leaving callers with a null terminal summary), and the progress accumulation cap is raised from 240 to 1200 characters to allow more meaningful summaries to reach callers.

Confidence Score: 5/5

Safe to merge — minimal, targeted fix with no side effects.

Both changes are straightforward and correct. The normalized value passed as terminalSummary is already bounded by the 1200-char cap enforced upstream, the empty-input guard is preserved, and the blocked-outcome paths are unaffected.

No files require special attention.

Reviews (1): Last reviewed commit: "fix(background-task): return progressSum..." | Re-trigger Greptile

@clawsweeper

clawsweeper Bot commented Apr 29, 2026 •

Copy link
Copy Markdown
Contributor

Thanks for the context here. I swept through the related work, and this is now duplicate or superseded.

Keep this PR open: it addresses a real ACP background-task message-loss bug that current main still has, but the submitted branch is conflicting with the refactored helper location, lacks required contributor real-behavior proof, and needs the known silent-token guard before merge.

Canonical path: Close this stale PR. The latest review rated it F, the branch still lacks merge-ready proof, and there has been no human follow-up after the durable review.

So I’m closing this here because the remaining work is already tracked in the canonical issue.

Review details

Best possible solution:

Close this stale PR. The latest review rated it F, the branch still lacks merge-ready proof, and there has been no human follow-up after the durable review.

Do we have a high-confidence way to reproduce the issue?

Yes by source inspection: successful ACP background tasks persist terminalSummary only from the resolver, and current main's resolver returns {} for ordinary non-blocked progress. I did not run a live ACP session in this read-only review.

Is this the best way to solve the issue?

No, not as submitted. Returning progress as a fallback terminal summary is the right narrow direction, but the patch must be ported after the helper split and strip silent control tokens before returning user-visible terminal text.

Security review:

Security review cleared: The diff only changes ACP background-task string handling and does not touch dependencies, workflows, secrets, package metadata, or code-execution paths.

AGENTS.md: found and applied where relevant.

What I checked:

  • stale F-rated PR: PR was opened 2026-04-29T05:37:54Z, is older than 30 days, and the latest review rated it F.
  • proof blocker: real behavior proof is missing and proof tier is F, so this branch is not merge-ready without contributor follow-up.
  • no human follow-up: live comments and timeline hydrated by apply contain no non-automation activity after the ClawSweeper review.

Likely related people:

  • mbelinky: Authored and merged the ACP background task lifecycle and blocked ACP task outcome changes that introduced and shaped the resolver path involved here. (role: background-task feature-history owner; confidence: medium; commits: 17c36b5093da, 5ef42fc8568e; files: src/acp/control-plane/manager.core.ts, src/acp/control-plane/manager.test.ts, src/tasks/task-registry.ts)
  • vincentkoc: Authored and merged the task executor delivery policy and ACP routing refactors that format successful task messages from terminalSummary. (role: task delivery refactor author; confidence: medium; commits: 817ac551b655, 126f77315f0b; files: src/tasks/task-executor-policy.ts, src/tasks/task-registry.ts, src/acp/control-plane/manager.core.ts)
  • amknight: Authored and merged the related streamed-progress chunk fix in the same ACP helper/test area, explicitly leaving this fallback/cap scope untouched. (role: recent adjacent contributor; confidence: medium; commits: fa445003b5eb; files: src/acp/control-plane/manager.core.ts, src/acp/control-plane/manager.test.ts)
  • Rohit: Current local blame attributes the extracted manager.background-task.ts helper shape to this recent broad commit, so they are relevant to the current file layout. (role: recent mover/refactor contributor; confidence: low; commits: e55cebf4c278; files: src/acp/control-plane/manager.background-task.ts, src/acp/control-plane/manager.turn-runner.ts)

Codex review notes: model internal, reasoning high; reviewed against 66880a5d736c.

@dcapclaw

Copy link
Copy Markdown

Confirming the bug from production use, and flagging one concern that matches clawsweeper's review note on #74070.

Reproduction confirmed in production. Running an equivalent local patch since 2026-05-06 across a Mac Studio M4 Max with 27 active ACP-backed crons (validate-predictions, health-summary, market-pipeline workers, etc.). Before the local patch: bare "Background task done" messages with no payload — operators had to dive into the task to see anything useful. After: full one-line progress reaches the parent. ~5,000+ task completions in the patched state, zero regressions, and the 240 → 1200 cap bump matches our actual usage (our cron summaries are routinely 400-900 chars: status + numbers + timestamps in a single DM-friendly line).

Concern matching clawsweeper's remaining-risk note. The unconditional return { terminalSummary: normalized } will surface control tokens such as ANNOUNCE_SKIP as visible terminal text whenever a silent-by-design task's progressSummary happens to end with the token. This is a real shape — sub-agents instructed to emit ANNOUNCE_SKIP on completion can have it carry through into the captured progress text. Our local patch handles this by stripping the trailing token before pass-through:

const cleaned = normalized.replace(/\s*ANNOUNCE_SKIP\s*$/i, "").trim();
if (!cleaned) return {};
return { terminalSummary: cleaned };

That closes the gap clawsweeper flagged (control-token leakage) without changing the happy-path behavior. Worth adding before merge IMO.

Otherwise the +2/-2 shape is exactly the right narrow scope. Once this lands with the strip guard, it would let us retire one local source patch.

@RomneyDa

Copy link
Copy Markdown
Member

Heads up: this PR needs to be updated against current main before the new required Dependency Guard check can pass.

@openclaw-barnacle

Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added stale Marked as stale due to inactivity triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels Jun 14, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. labels Jun 14, 2026
@clawsweeper

clawsweeper Bot commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper applied the proposed close for this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XS stale Marked as stale due to inactivity status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] resolveBackgroundTaskTerminalResult returns empty terminalSummary; progressSummary truncated at 240 chars

3 participants