Skip to content

Allow user steering while subagents run; synchronous task batches block messages #1597

Open

Description

@obit91

Summary

While Squad is running synchronous subagent work, the main conversation can become unable to process new user messages. In an observed Copilot CLI session, a steering message sent during active work was not read or acted on for almost ten minutes. By the time it was handled, agents had continued using decisions the user was trying to change.

This is related to #1231's single-threaded execution concerns, but it is a separate interaction problem: even when Squad does dispatch agents, synchronous task execution can block the user-control path.

Observed behavior

Environment:

  • Squad v0.11.0
  • GitHub Copilot CLI v1.0.71
  • Windows
  • Multiple specialist tasks dispatched in a synchronous batch

Generic reproduction:

  1. Ask Squad to perform a multi-agent task.
  2. Squad dispatches several task calls using mode: "sync".
  3. While those tasks are still running, send a new message that changes a decision or asks the coordinator to stop/re-route work.
  4. The message remains queued and is not processed until the synchronous task batch returns.

Observed delay: approximately ten minutes.

Impact

  • The user cannot correct a bad assumption, model choice, scope decision, or safety concern while work is underway.
  • Agents continue consuming tokens on work the user has already tried to redirect.
  • The UI appears unresponsive and gives no reliable indication that the steering message was received.
  • Long-running orchestration becomes less interactive than a normal chat, even though user steering is especially important during parallel agent work.

No task-specific or private project content is required to reproduce this behavior.

Expected behavior

The main conversation/control channel should remain responsive while subagents execute. A new user message should be delivered immediately and allow the coordinator to:

  • cancel selected or all running agents;
  • pause and wait for a decision;
  • send updated instructions to steer compatible running agents;
  • mark in-flight results as obsolete;
  • continue unaffected agents while stopping only invalidated work.

If the underlying client cannot interrupt synchronous tool calls, Squad should avoid holding the main thread: launch interruptible background work, return control to the user, and collect results asynchronously.

Suggested UX

  • Show each active task with running, steering requested, cancelling, or completed state.
  • Acknowledge a new message immediately, even if cancellation takes time.
  • Provide a first-class Stop, Pause, or Change direction action.
  • Attach a generation/decision version to each task so results produced under superseded instructions are not merged automatically.

Suggested acceptance criteria

  • A user message sent while subagents are running is acknowledged within a few seconds rather than after task completion.
  • The coordinator can cancel or invalidate individual in-flight tasks.
  • Updated user decisions can be propagated to compatible running agents or used to restart only affected work.
  • Synchronous task batches do not block the conversation event loop; otherwise Squad automatically uses an interruptible background execution path.
  • Obsolete results are visibly marked and excluded from automatic synthesis.
  • An integration test sends a steering message during a deliberately slow multi-agent batch and confirms prompt handling before the batch finishes.
  • Documentation explains runtime limitations and fallback behavior on clients that cannot support interruption.

Activity

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

    wave1:P9Wave 1 PR group P9wave:1-nextWave 1 — immediate next sprint

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions