-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomersuiThe Command Center of Skyflo.aiThe Command Center of Skyflo.ai
Description
When the agent completes a stream that ends with a tool call requiring approval, the chat interface incorrectly auto-drains queued messages even though it's still waiting for user action. This causes queued messages to interrupt the approval flow, breaking the conversation state and creating race conditions.
Scope
- UI (
ui/src/components/chat/ChatInterface.tsx):- Modify the queue-draining
useEffect(currently around line 614-627) to check if there are any pending approvals before draining the queue. - Add a condition that prevents auto-drain when
approvableTools.length > 0. - Ensure the effect has access to
approvableToolsby positioning it after theapprovableToolsmemoized value definition. - Update the dependency array to include
approvableTools.length.
- Modify the queue-draining
- The fix should preserve existing queue behavior: messages should still drain automatically once approvals are resolved and the stream completes.
Acceptance criteria
- Queued messages remain in the queue when the agent is waiting for tool approval.
- Once an approval is given and the subsequent agent response completes (with no remaining pending approvals), the queue resumes draining normally.
- The "Submit now" feature for queued messages continues to work during approval wait states.
- No regressions to existing queue functionality (FIFO ordering, removal, immediate submission).
- Attach a screen recording showing the new behavior to demonstrate the fix.
How to test manually
- Run the Engine, MCP server, and UI locally (see respective README files).
- Start a conversation that triggers a tool call requiring approval (e.g., "Delete the nginx deployment in the default namespace").
- While the agent is responding, type and submit another message — it should enter the queue.
- Wait for the tool approval prompt to appear.
- Verify that the queued message remains in the queue and does not auto-submit.
- Approve or deny the tool call.
- Wait for the agent's response to complete.
- Verify that the queued message now auto-drains and sends.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomersuiThe Command Center of Skyflo.aiThe Command Center of Skyflo.ai