Skip to content

Conversation

@ulivz
Copy link
Member

@ulivz ulivz commented Dec 8, 2025

Fixes issue where UI incorrectly shows agent as not processing during tool execution in streaming mode.

Problem: In Agent Server Next, endpoint only relied on and . During streaming mode, when tools are executing, agent status could briefly show as IDLE even though processing is still ongoing.

Solution: Enhanced status detection by:

  1. Checking recent events for active tool calls ( without corresponding )
  2. Checking for streaming messages ( or )
  3. Combining this with the original processing status for more accurate detection

This ensures the UI correctly shows processing state during tool execution in streaming mode.

Changes:

  • Modified in
  • Added event-based status detection as fallback when agent reports IDLE
  • Maintains backward compatibility with existing status checking

Fixes issue where processing indicator would disappear during tool execution in streaming mode.

…g mode

- Add enhanced processing status detection in getSessionStatus
- Check recent events for active tool calls and streaming messages
- Prevent false IDLE status during tool execution in streaming mode
@netlify
Copy link

netlify bot commented Dec 8, 2025

Deploy Preview for agent-tars-docs ready!

Name Link
🔨 Latest commit bdf656f
🔍 Latest deploy log https://app.netlify.com/projects/agent-tars-docs/deploys/69371e6a963a7600089afe6a
😎 Deploy Preview https://deploy-preview-1760--agent-tars-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Dec 8, 2025

Deploy Preview for tarko ready!

Name Link
🔨 Latest commit bdf656f
🔍 Latest deploy log https://app.netlify.com/projects/tarko/deploys/69371e6a697789000838c146
😎 Deploy Preview https://deploy-preview-1760--tarko.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

ulivz added 2 commits December 9, 2025 02:20
…ming mode

Improve event-based detection to prevent Stop button flickering by:
- Better tool call tracking with start/end event matching
- Enhanced streaming activity detection
- Added recent run start and pending message checks
- Increased event history window from 5 to 10 events

This addresses the core issue where agent status briefly shows as IDLE
during tool execution in streaming mode, causing UI inconsistencies.
- Use event stream as primary source of truth for processing state
- Eliminate timing gaps that cause UI Stop button flicker
- Prioritize active tool calls and streaming activity over Agent.status()
- Reduce event window to 5 events for better performance
- Add proper fallback to Agent.status() when event stream unavailable
@ulivz
Copy link
Member Author

ulivz commented Dec 13, 2025

Replaced by #1766

@ulivz ulivz closed this Dec 13, 2025
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