Skip to content

Stream tool execution progress to connected clients #52

@deathbyknowledge

Description

@deathbyknowledge

Problem

Connected clients currently do not receive per-tool execution progress for session-initiated tools in real time. They typically see only session-level chat events (partial / final) after the agent loop resumes.

Impact

For workflows with long-running tools (especially node/native async tools like future window/render flows), the user has no immediate visibility into:

  • tool invocation started
  • tool in progress
  • intermediate tool results/errors
  • completion state until final assistant turn

Current behavior reference

  • gateway routes client-driven tool.invoke via pending route kind: "client" and can respond directly with tool.result.
  • session-driven tool calls (tool.request) use kind: "session" and feed result into session.toolResult, then LLM continuation.
  • chat stream comes from Session.broadcastToClients states.

Request

Add explicit streaming of tool lifecycle events for session sessions, e.g.:

  1. Emit tool.started when tool call is dispatched.
  2. Emit tool.result / tool.error updates.
  3. Optionally emit aggregate tool.phase events for queued/parallel tool batches.
  4. Keep tool.request path unchanged for internal logic so behavior remains backward compatible.

Notes

This is intentionally separate from protocol routing/pending-op refactor work currently in progress.

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions