Skip to content

Add stop button to chat interface on agent details page #44

Closed

Description

@vybe

Summary

Add a stop button to the Chat tab on the agent details page that allows users to cancel an in-progress chat request.

Background

Currently, when a user sends a message in the Chat panel, the interface shows "Thinking..." while waiting for a response. There is no way to cancel this request if:

  • The user realizes they sent the wrong message
  • The request is taking too long
  • The user wants to try a different prompt

Requirements

  1. Stop button UI - Display a stop button next to or in place of the send button while a chat request is in progress
  2. Cancel request - Clicking stop should cancel the pending HTTP request to /api/agents/{name}/task
  3. SIGINT to agent - Optionally send SIGINT to the Claude Code process running in the agent container to stop the current execution
  4. State cleanup - Reset the loading state and allow the user to send a new message

Technical Notes

  • The chat is implemented in src/frontend/src/components/ChatPanel.vue
  • Uses axios.post() to send messages - needs AbortController for cancellation
  • Backend endpoint is POST /api/agents/{name}/task
  • May need a new backend endpoint like POST /api/agents/{name}/task/abort to send SIGINT to the agent process

Acceptance Criteria

  • Stop button appears while chat request is in progress
  • Clicking stop cancels the pending request
  • User can immediately send a new message after stopping
  • Clear visual feedback that the request was stopped

Activity

  1. added
    enhancement
    on Feb 25, 2026
  2. vybe commented on Mar 30, 2026

    @vybe
    ContributorAuthor

    Actualization (2026-03-30)

    Current state: Not implemented for the Chat tab. Stop/cancel exists for other execution contexts:

    • ✅ Tasks tab — Stop button for running tasks (SIGINT → SIGKILL flow)
    • ✅ Execution Detail page — Stop button for live executions
    • ✅ Process Engine — Cancel execution endpoint
    • ❌ Chat tab — No stop button. "Thinking..." shows with no way to cancel.

    Technical notes update:

    • Chat uses POST /api/agents/{name}/task (not /chat anymore)
    • Backend has execution termination infrastructure in task_execution_service.py
    • Frontend would need AbortController on the axios request + backend SIGINT to agent process

    Recommendation: Still valid and still wanted. The execution termination infrastructure exists; this is mostly a frontend wiring task to add a stop button to ChatPanel.vue and connect it to the existing kill mechanism.

  3. added
    status-in-progress
    on Apr 1, 2026
  4. vybe commented on Apr 4, 2026

    @vybe
    ContributorAuthor

    Closing — implemented in commit a5b5e2c (stop button added to chat interface).

  5. added
    complexity-low
    on Jun 3, 2026
  6. removed
    status-in-progress
    on Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    complexity-lowenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions