Home

mweinbach / agent-coworker

publicmweinbach/agent-coworker
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

fix: send ask_response when dismissing ask modal in desktop app

8 months ago

75d6fc0
Authored
mweinbach2/20/2026, 7:01:08 PM
Previously, dismissing the ask dialog (via Escape, clicking outside, or
Cancel button) only cleared the UI state without sending an ask_response
to the server. This left the server-side deferred promise unresolved,
causing the agent's askUser() call to hang forever.

Changes:
- PromptModal: prevent click-outside from closing ask modals; Escape and
  Skip button now send "[skipped]" response so the agent unblocks
- App.tsx: Escape key handler sends a response for ask modals instead of
  bare dismissal
- store.actions: answerAsk checks sendThread return value and keeps the
  modal open if the WebSocket send fails

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Parente0dccd4

3 files changed
  • apps/desktop/src/App.tsx+11−1
  • apps/desktop/src/app/store.actions.ts+6−1
  • apps/desktop/src/ui/PromptModal.tsx+27−10