Skip to content

[enhancement] Add Real-Time Session Event Monitoring for Task Execution Feedback #9

@github-actions

Description

@github-actions

Background

Recent changes in the Copilot SDK (v0.1.24-preview.0) include:

  • Event naming improvements: The SDK renamed tool.execution_end to tool.execution_complete for clarity (PR #385 by Andrew Yoon, merged Feb 6, 2026)
  • Session event handling: Enhanced session event subscription mechanisms with better reliability (PR #24 by nathfavour)
  • Forward compatibility tests: New tests verify handling of unknown session event types (PR #35)
  • CLI update: @github/copilot upgraded to 0.0.405 (PR #396 by Devraj Mehta, merged Feb 7, 2026)

Commit reference: 439e0f0

Proposal

Implement real-time session event monitoring in src/services/executor.ts to provide users with granular feedback during task execution. The SDK's session event API allows subscriptions to events like:

  • tool.execution_complete (formerly tool.execution_end)
  • Progress updates from Copilot agents
  • Token usage and performance metrics

Implementation approach:

  1. Add event listeners in the Copilot SDK wrapper (src/services/copilot.ts)
  2. Stream events to the execution screen component (src/screens/execute.tsx)
  3. Display real-time progress indicators for each task (e.g., "Installing dependencies...", "Running tests...", "Generating code...")
  4. Show estimated completion percentages based on event data

Benefit

  • Better UX: Users see what Copilot is actively doing instead of staring at a blank "In Progress" spinner
  • Debugging: When tasks fail, users can see exactly where execution stopped
  • Transparency: Token usage and performance data help users understand costs
  • Trust: Real-time feedback builds confidence that the system is working

Acceptance Criteria

  • Session event subscription implemented in src/services/copilot.ts using SDK's event API
  • Event stream plumbed to src/screens/execute.tsx (via React state or context)
  • Execution screen displays at least 3 types of events: task start, progress updates, and tool.execution_complete
  • Event log is scrollable and shows timestamps
  • Error events are highlighted in red and include actionable messages
  • Unit tests verify event handlers properly parse SDK event payloads
  • Documentation updated to explain the event monitoring feature

AI generated by Weekly Enhancement Suggestions

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions