Skip to content

perf(agents): reduce subagent streaming overhead - #202

Merged
badcuban merged 1 commit into
mainfrom
perf/subagent-streaming-performance
Aug 31, 2026
Merged

perf(agents): reduce subagent streaming overhead#202
badcuban merged 1 commit into
mainfrom
perf/subagent-streaming-performance

Conversation

@badcuban

Copy link
Copy Markdown
Collaborator

Multiple active subagents persisted every streamed text update and made the client repeatedly fold the same activity history. That multiplied server, SQLite, WebSocket, route, and renderer work during parallel agent runs.

This change coalesces only in-progress child result updates while keeping the first update immediate and lifecycle/final updates lossless. It also derives all client subagent views in one pass and limits detailed activity subscriptions to an open child inspector.

Measured result:

  • Three-agent burst fixture: 30 persisted result events reduced to 6 (80%).
  • Client subagent activity folds: 4 reduced to 1 (75%).
  • No periodic idle polling was added.

Validation:

  • ProviderRuntimeIngestion: 81/81
  • Session logic: 154/154
  • Agents panel browser tests: 41/41
  • Full web browser suite: 502/502
  • Format, lint, and full typecheck passed
  • Independent production review approved

@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
threadlines Skipped Skipped Aug 31, 2026 8:26pm

Request Review

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XL labels Aug 31, 2026
@badcuban
badcuban force-pushed the perf/subagent-streaming-performance branch from 9833cc2 to b04271e Compare August 31, 2026 20:26
@badcuban
badcuban merged commit 1a07f4f into main Aug 31, 2026
16 checks passed
@badcuban
badcuban deleted the perf/subagent-streaming-performance branch August 31, 2026 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant