Summary
Dynamic/background subagent completion notifications lose authoritative FAILED/CANCELLED terminal information. A failed task is announced to the parent as "has completed" with (no output), while the Harness TaskRecord contains the real failed status and error.
Reproduction
Using AgentScope Java main at e3a412ed2cc944e401da861c8d5e464b967724e9 / 2.0.1-SNAPSHOT:
- Build a
HarnessAgent with dynamic subagents and the default workspace-backed task repository/message bus.
- Spawn a background child whose invocation terminates with
IllegalStateException("failure-marker").
- Wait until
TaskRepository.getTask(...) reports FAILED and contains failure-marker.
- Continue the parent so
InboxMiddleware drains the completion notification.
- Inspect the injected
HintBlock.
Actual hint:
<system-notification>Background subagent task '...' (agent=...) has completed.
Result:
(no output)</system-notification>
The parent never receives the authoritative failed status or error. The same callback shape cannot represent cancellation reason/status either.
Source evidence
HarnessAgent.Builder.wireTaskRepositoryMessageBus(...) installs a WorkspaceTaskRepository completion callback whose arguments end at nullable result. It formats every terminal callback as "has completed" and uses:
result != null ? result : "(no output)"
No task status, error message, or cancellation payload is available to the notification formatter.
Expected behavior
The Harness-owned completion delivery should carry a typed terminal outcome into parent reasoning:
- task id and subagent identity
- terminal status (COMPLETED / FAILED / CANCELLED)
- result for success
- authoritative error for failure
- cancellation reason when available
The fix should remain in the Harness task/message-bus lifecycle. Consumers should not need to add a second completion callback, task store, or delivery registry.
Impact
This blocks reliable parent aggregation and user-visible partial-failure reporting for background collaboration: the task readback says FAILED while automatic parent reasoning says only "(no output)".
Summary
Dynamic/background subagent completion notifications lose authoritative FAILED/CANCELLED terminal information. A failed task is announced to the parent as "has completed" with
(no output), while the HarnessTaskRecordcontains the real failed status and error.Reproduction
Using AgentScope Java main at
e3a412ed2cc944e401da861c8d5e464b967724e9/2.0.1-SNAPSHOT:HarnessAgentwith dynamic subagents and the default workspace-backed task repository/message bus.IllegalStateException("failure-marker").TaskRepository.getTask(...)reportsFAILEDand containsfailure-marker.InboxMiddlewaredrains the completion notification.HintBlock.Actual hint:
The parent never receives the authoritative failed status or error. The same callback shape cannot represent cancellation reason/status either.
Source evidence
HarnessAgent.Builder.wireTaskRepositoryMessageBus(...)installs aWorkspaceTaskRepositorycompletion callback whose arguments end at nullableresult. It formats every terminal callback as "has completed" and uses:No task status, error message, or cancellation payload is available to the notification formatter.
Expected behavior
The Harness-owned completion delivery should carry a typed terminal outcome into parent reasoning:
The fix should remain in the Harness task/message-bus lifecycle. Consumers should not need to add a second completion callback, task store, or delivery registry.
Impact
This blocks reliable parent aggregation and user-visible partial-failure reporting for background collaboration: the task readback says FAILED while automatic parent reasoning says only "(no output)".