Skip to content

[Feature Request] Add public plan-then-run API and stronger event/state guarantees to Workforce #3980

@fengju0213

Description

@fengju0213

Required prerequisites

Motivation

Applications that need a "plan → edit → run" workflow must subclass Workforce and override internal methods. Specifically:

  • No public planning APIhandle_decompose_append_task() decomposes and immediately appends to the pending queue. There is no way to decompose, inspect/edit the plan, and then execute separately.
  • Event metadata insufficientWorkerCreatedEvent, TaskAssignedEvent, TaskStartedEvent, TaskCompletedEvent lack fields like agent_id, task_content, failure_count, pool_config. Applications must read internal state to build UI notifications.
  • task.subtasks out of sync — when a subtask completes or fails, parent.subtasks[*].state/result is not updated. Applications must manually sync with _sync_subtask_to_parent() overrides.

Scope

Workforce orchestration only. ChatAgent callbacks and SingleAgentWorker streaming are tracked separately.

Solution

No response

Alternatives

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions