Skip to content

[BUG] /clear and new-conversation leave in-flight A2A tasks running in the supervisor #718

Closed

Description

@edenreich

Summary

ClearAllAgents (called from /clear at internal/shortcuts/core.go and on new/switch conversation at internal/services/persistent_conversation.go) clears only the A2ATaskTracker, not the jobs.Supervisor. Since #693 made the supervisor the single source of truth for active A2A tasks (the /tasks list, the status-bar indicator, and HasPending all read it), a /clear leaves in-flight A2A jobs running in the supervisor - so they still appear in /tasks and the status bar, and can still land a completion note after the conversation was cleared.

supervisor.WindAll is not the right tool - it would also stop running background shells and subagents, which a conversation clear should not touch. The fix is a kind-scoped wind, e.g. Supervisor.WindKind(kind domain.JobKind, sig domain.WindSignal), invoked with JobKindA2A from the three ClearAllAgents call sites.

Follow-up from #693.

Steps to Reproduce

  1. Configure an A2A agent and delegate a long-running task via A2A_SubmitTask.
  2. While it is running, run /clear (or /new, or switch conversations).
  3. Open /tasks and watch the status-bar indicator.

Expected Behavior

Clearing/switching the conversation stops in-flight A2A tasks: they disappear from /tasks and the status-bar indicator, and no late completion note is delivered.

Actual Behavior

The A2A task keeps running in the supervisor: it still shows in /tasks and the status-bar indicator, and its completion note can arrive after the clear.

Activity

  1. added
    bug
    on Jul 2, 2026
  2. added theissue type on Jul 2, 2026
  3. moved this to Todo in 2026on Jul 2, 2026
  4. moved this from Todo to In progress in 2026on Jul 2, 2026
  5. moved this from In progress to QA in 2026on Jul 2, 2026
  6. inference-gateway-releaser commented on Jul 3, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.128.0 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

  7. moved this from QA to Done in 2026on Jul 3, 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

    bugreleased

    Type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions