Skip to content

[FEATURE]: Coalesce Code Mode progress metadata updates #37812

Description

@flowluap

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Code Mode currently calls ctx.metadata for every child-tool start and completion. Because each update contains the cumulative toolCalls array, bursts amplify event and persistence work as the call count grows, and child execution is coupled to metadata-sink latency.

A 20-call burst currently emits 40 metadata updates. Coalescing transient progress on a short interval reduced that to one complete terminal snapshot in the benchmark, with event payload bytes dropping from 9,156 to 3,128 (65.8%).

Requested behavior:

  • coalesce transient Code Mode progress updates
  • keep running visibility for longer child calls
  • always publish the complete terminal state on normal completion
  • stop the progress publisher before the terminal snapshot so stale updates cannot arrive later
  • keep cancellation bounded when the metadata sink stalls

This is limited to Code Mode cumulative progress metadata; it does not change generic event protocol or replay semantics.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions