Skip to content

Fusion: send each worker's brief and model note on its started event (ATO-1754) - #1757

Closed
sosidudku1 wants to merge 2 commits into
mainfrom
fix/ato-1754-fusion-worker-brief
Closed

sosidudku1 wants to merge 2 commits into
mainfrom
fix/ato-1754-fusion-worker-brief

Conversation

@sosidudku1

@sosidudku1 sosidudku1 commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Why

Discord (guxar, 21.11; kerry6312, 23.11): Fusion workers are a black box. There is no way to see what the orchestrator actually told a worker, and when a task lands on a different model than the role asked for, that only shows up in the orchestrator's final tool result.

What

  • fusion_worker with phase: "started" now carries brief: the exact message the worker's turn was started with (renderWorkerBrief plus any suffix), clipped at 40,000 chars with a line saying so.
  • It also carries modelNote when the task did not run on the model it asked for (TaskLeg.note: a role with no model configured, or a second local model this machine is not marked to hold). Wired from fusion.delegate through a new optional runner option taskModelNote.
  • SSE frame forwards them as brief and model_note; the AG-UI custom event as brief and modelNote. Empty values are not sent.
  • TUI: the started feed line prints the model note, e.g. » worker api · qwen: started (role review has no model configured; ran on the workers' model qwen).

Nothing else changes: an agent run without roles sends no note, and hosts that ignore the new fields see the same frames as before.

Desktop side: a separate PR on rel/xp-build shows the brief under the worker's started line.

Tests

  • worker-runner.test.ts: the started event's brief equals the message the worker turn got (suffix included); the note is present only for the task that has one; the clip keeps a brief at the cap and cuts one past it.
  • stream-fusion-worker-frame.test.ts: SSE forwards brief / model_note, and drops empty ones.
  • format-fusion-worker-line.test.ts: the started line with a note.

Refs ATO-1754

Verification

  • Reviewer and skeptic (fresh agents, read only) went through both PRs. One minor finding from both: in the desktop, two consecutive started lines with the same text were folded into one row, hiding the second brief. Fixed in Desktop: show what each Fusion worker was told (ATO-1754) #1758 (the fold now also compares the brief).
  • Checked by reading, no finding: the brief is set before every place the started event can fire; role-leg and split tasks get the note; no existing test compares the full key set of a started event or frame; desktop smoke frames without the new fields keep the old line text.
  • Added after review: a test that the started line carries the clipped brief for an oversized task.
  • Waiting on CI here; the live run is part of the combined desktop run.

A worker's started event now carries the message its turn was started
with (clipped at 40,000 chars) and, when the task asked for a role or
model it did not get, the reason. The SSE and AG-UI frames forward both;
the TUI started line prints the reason.

Refs ATO-1754
@sosidudku1

Copy link
Copy Markdown
Collaborator Author

Merged into main via #1764 (all commits are in main). GitHub did not mark it merged because of the outage during the merge.

@sosidudku1 sosidudku1 closed this Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant