Skip to content

Add real-time agent status streaming to UI#2

Merged
dmfenton merged 1 commit intoMainfrom
claude/agent-status-streaming-E0Pib
Jan 2, 2026
Merged

Add real-time agent status streaming to UI#2
dmfenton merged 1 commit intoMainfrom
claude/agent-status-streaming-E0Pib

Conversation

@dmfenton
Copy link
Copy Markdown
Owner

@dmfenton dmfenton commented Jan 2, 2026

Implement comprehensive status updates from the agent to the UI:

Backend changes:

  • Add new AgentStatus values: 'executing' and 'error'
  • Add new message types: ThinkingDeltaMessage, CodeExecutionMessage,
    ErrorMessage, PieceCompleteMessage, IterationMessage
  • Update agent.py with AgentCallbacks dataclass for event callbacks
  • Stream thinking text as deltas (not accumulated) for efficiency
  • Broadcast iteration start, code execution start/complete, and errors

Frontend changes:

  • Update types.ts with new message types and AgentMessage metadata
  • Handle all new message types in useCanvas.ts
  • Add iteration and thinking state tracking
  • Update MessageStream with styled bubbles for each message type:
    • Error messages with red accent and expandable details
    • Code execution with expandable stdout/stderr output
    • Piece complete with success styling
    • Iteration pills showing current/max progress
  • Update StatusPill to handle 'executing' and 'error' states

This enables showing everything happening in real-time as the agent
thinks, executes code, and draws.

Implement comprehensive status updates from the agent to the UI:

Backend changes:
- Add new AgentStatus values: 'executing' and 'error'
- Add new message types: ThinkingDeltaMessage, CodeExecutionMessage,
  ErrorMessage, PieceCompleteMessage, IterationMessage
- Update agent.py with AgentCallbacks dataclass for event callbacks
- Stream thinking text as deltas (not accumulated) for efficiency
- Broadcast iteration start, code execution start/complete, and errors

Frontend changes:
- Update types.ts with new message types and AgentMessage metadata
- Handle all new message types in useCanvas.ts
- Add iteration and thinking state tracking
- Update MessageStream with styled bubbles for each message type:
  - Error messages with red accent and expandable details
  - Code execution with expandable stdout/stderr output
  - Piece complete with success styling
  - Iteration pills showing current/max progress
- Update StatusPill to handle 'executing' and 'error' states

This enables showing everything happening in real-time as the agent
thinks, executes code, and draws.
@dmfenton dmfenton merged commit 3514247 into Main Jan 2, 2026
@dmfenton dmfenton deleted the claude/agent-status-streaming-E0Pib branch January 2, 2026 23:31
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.

2 participants